This misidentified scope lexer/parser: @lexer::members { } @parser::members { }

This commit is contained in:
Terence Parr 2012-11-22 15:50:21 -08:00
parent 3c0883e9c3
commit 355eb42898
2 changed files with 2 additions and 1 deletions

View File

@ -4,6 +4,7 @@ November 22, 2012
* make sure left-recur rule translation uses token stream from correct imported file.
* actions like @after in imported rules caused inf loop.
* This misidentified scope lexer/parser: @lexer::members { } @parser::members { }
November 18, 2012

View File

@ -193,7 +193,7 @@ public class GrammarTransformPipeline {
String scopeName = rootGrammar.getDefaultActionScope();
GrammarAST scope, name, action;
if ( at.getChildCount()>2 ) { // must have a scope
scope = (GrammarAST)at.getChild(1);
scope = (GrammarAST)at.getChild(0);
scopeName = scope.getText();
name = (GrammarAST)at.getChild(1);
action = (GrammarAST)at.getChild(2);