diff --git a/tool/src/org/antlr/v4/tool/Grammar.java b/tool/src/org/antlr/v4/tool/Grammar.java index 1a76e95ac..ed47a558a 100644 --- a/tool/src/org/antlr/v4/tool/Grammar.java +++ b/tool/src/org/antlr/v4/tool/Grammar.java @@ -264,7 +264,8 @@ public class Grammar implements AttributeResolver { } else { String scope = atAST.getChild(0).getText(); - if ( scope.equals(getTypeString()) ) { + String gtype = getTypeString(); + if ( scope.equals(gtype) || (scope.equals("parser")&>ype.equals("combined")) ) { String name = atAST.getChild(1).getText(); namedActions.put(name, (ActionAST)atAST.getChild(2)); }