Problem solved. Thanks for the replies, the parameterized version does exactly what I need: localVariableDeclaration: : LOCAL! variableDeclarationList[LOCAL] ; variableDeclarationList[int type] : variableDcl ( ',' variableDcl )* -> {type == LOCAL}? ^(LOCAL variableDcl)+ -> // others ;