// special case, we add a left-paren for the shunting yard alg.
this.name = theSignature;
this.returnValue = null;
} else {
// non-special case, find the name of the function/operator
final SimpleParser parser = new SimpleParser(theSignature);
boolean pass = false;
parser.eatWhiteSpace();
this.name = parser.readToChars("(").trim();
parser.advance();
boolean done = false;
while (!done) {
if (parser.peek() == ')') {
parser.advance();
done = true;
} else if (parser.peek() == ':') {
parser.advance();
pass = true;
} else if (parser.peek() == '{') {
final ParamTemplate temp = readParam(parser);
temp.setPassThrough(pass);
pass = false;
this.params.add(temp);
} else {
parser.advance();
if( parser.eol() ) {
throw new EncogError("Invalid opcode template.");
}
}
}
// get the return type
parser.eatWhiteSpace();
if (!parser.lookAhead(":")) {
throw new EACompileError("Return type not specified.");
}
parser.advance();
parser.eatWhiteSpace();
this.returnValue = readParam(parser);
}
}