tags:

views:

173

answers:

2

Using ANTLR v3 and the CSharp2 language specifier, is there any way to indicate that you want the generated lexer or parser to be internal versus the default of public?

The namespace is specified with:

@lexer::namespace {My.Namespace}

and I would assume something similar exists for the access specifier, but I have been unable to find it.

A: 

I wanted to know the same thing, from looking at the template that it uses, it doesn't look like you can. "public" is hard coded.

Ted Elliott
+2  A: 

This thread on the antlr-interest mailing list talks about it. At the time of writing they are adding access specifiers to rules, but don't support access specifiers on the entire parser/lexer class. Will update if that changes.

Bearddo