make code slightly more obvious.

This commit is contained in:
Terence Parr 2012-12-01 16:23:44 -08:00
parent 6d6389eef2
commit 84c34d2391
1 changed files with 2 additions and 2 deletions

View File

@ -328,14 +328,14 @@ public class ParserFactory extends DefaultOutputModelFactory {
public void defineImplicitLabel(GrammarAST ast, LabeledOp op) {
Decl d;
Rule r = g.getRule(ast.getText());
if ( ast.getType()==ANTLRParser.SET || ast.getType()==ANTLRParser.WILDCARD ) {
String implLabel =
gen.target.getImplicitSetLabel(String.valueOf(ast.token.getTokenIndex()));
d = getTokenLabelDecl(implLabel);
((TokenDecl)d).isImplicit = true;
}
else if ( r!=null ) {
else if ( ast.getType()==ANTLRParser.RULE_REF ) { // a rule reference?
Rule r = g.getRule(ast.getText());
String implLabel = gen.target.getImplicitRuleLabel(ast.getText());
String ctxName =
gen.target.getRuleFunctionContextStructName(r);