Lexers
- no nongreedy
'//' .* '\n' - added modes
grammars
no global scopes, but rules can see all vals from invoking rules
Labels:
Differences from v3
'//' .* '\n'no global scopes, but rules can see all vals from invoking rules
Powered by a free Atlassian Confluence Open Source Project License granted to ANTLR. Evaluate Confluence today.
1 Comment
Hide/Show CommentsSep 20, 2011
George S. Cowan
You said "no global scopes, but rules can see all vals from invoking rules". Does that mean that I would use the top level rule scope for the effect of a global rule?
Then how would I unit test individual rules that make use of that scope? I need some way to set the environment to the state that I want to test.
Also, I use global scopes when the lookahead is checking semantic predicate hoisting to get myself out of really sticky situations (don't try this at home, kids!).
If I am misunderstanding what "no global scopes" means, please point me to the discussion, so I can get my act together, here.