// $ANTLR start functionparam
// QSpecBuilder.g:192:1: functionparam returns [FuncArg arg] : (ge= GROOVYEXPRESSION | s= STRING | i= ID | n= NUMBER );
public final FuncArg functionparam() throws RecognitionException {
FuncArg arg = null;
CommonTree ge=null;
CommonTree s=null;
CommonTree i=null;
CommonTree n=null;
arg = new FuncArg();
try {
// QSpecBuilder.g:197:1: (ge= GROOVYEXPRESSION | s= STRING | i= ID | n= NUMBER )
int alt18=4;
switch ( input.LA(1) ) {
case GROOVYEXPRESSION:
{
alt18=1;
}
break;
case STRING:
{
alt18=2;
}
break;
case ID:
{
alt18=3;
}
break;
case NUMBER:
{
alt18=4;
}
break;
default:
NoViableAltException nvae =
new NoViableAltException("192:1: functionparam returns [FuncArg arg] : (ge= GROOVYEXPRESSION | s= STRING | i= ID | n= NUMBER );", 18, 0, input);
throw nvae;
}
switch (alt18) {
case 1 :
// QSpecBuilder.g:198:2: ge= GROOVYEXPRESSION
{
ge=(CommonTree)input.LT(1);
match(input,GROOVYEXPRESSION,FOLLOW_GROOVYEXPRESSION_in_functionparam574);
arg.setExpr(ge.getText());
}
break;
case 2 :
// QSpecBuilder.g:199:2: s= STRING
{
s=(CommonTree)input.LT(1);
match(input,STRING,FOLLOW_STRING_in_functionparam585);
arg.setStr(s.getText());
}
break;
case 3 :
// QSpecBuilder.g:200:2: i= ID
{
i=(CommonTree)input.LT(1);
match(input,ID,FOLLOW_ID_in_functionparam594);
arg.setId(i.getText());
}
break;
case 4 :
// QSpecBuilder.g:201:2: n= NUMBER
{
n=(CommonTree)input.LT(1);
match(input,NUMBER,FOLLOW_NUMBER_in_functionparam604);
arg.setiVal(Integer.parseInt(n.getText()));
}
break;
}