[antlr-interest] Scopes in lexers don't work

Thomas Brandon tbrandonau at gmail.com
Tue Jul 24 08:36:54 PDT 2007


On 7/23/07, Kay Roepke <kroepke at classdump.org> wrote:
> On Jul 22, 2007, at 4:32 PM, Kay Roepke wrote:
>
> > I'm sorry, you are right. There were two template invocations
> > missing from
> > lexerRule.
> > When Ter is back, I'll talk to him and then submit. Should then be
> > included
> > in the next daily build/release.
>
> Just for reference: It's fixed in the depot. Until there's a build
> available, you can use
> the Java.stg from fisheye:
> <http://fisheye2.cenqua.com/browse/antlr/src/org/antlr/codegen/
> templates/Java/Java.stg?r=3930>
>
This fixes global scopes but dynamic scopes don't work as the scope
object isn't declared. Adding
"<ruleAttributeScope(scope=ruleDescriptor.ruleScope)>" to the start of
the lexerRule template fixes this.

Tom.
> cheers,
> -k
> --
> Kay Röpke
> http://classdump.org/
>
>
>
>
>


More information about the antlr-interest mailing list