How to specify access specifier in ANSLR v3 generated parser or lexer?

Using ANTLR v3 and the CSharp2 language specifier, is there a way to indicate that you want the generated lexer or parser to be internal or standard by default?

The namespace is specified with

@lexer::namespace {My.Namespace}

      

and I would guess that something similar exists for an access specifier, but I couldn't find it.

+1


source to share


2 answers


This thread on the antlr-interest mailing list talks about it. At the time of writing, they add access specifiers to rules, but do not support access specifiers in the entire parser / lexer class. Will be updated if this changes.



+2


source


I wanted to know the same thing, looking at the template it uses, it doesn't look like you. "public" is hardcoded.



0


source







All Articles