[antlr-interest] Access Specifier for lexer's and parsers

Jason Moore jason.s.moore at gmail.com
Tue Feb 10 14:30:48 PST 2009


So does this apply to just the rules within the parser or can you
specify the entire generated parser class be internal?

Jason

On Tue, Feb 10, 2009 at 3:28 PM, Sam Harwell
<sharwell at pixelminegames.com> wrote:
> My local build does allow access specifiers on parser rules. The default
> visibility is private, so protected/public rules must be marked as such
> after the update. Since there are generally very few entry points to a
> grammar, you may only have to mark 1 or 2 rules as public. I'll try and
> get a public build up by next week. I'm closing an independent contract
> right now so time is tight.
>
> Sam
>
> -----Original Message-----
> From: antlr-interest-bounces at antlr.org
> [mailto:antlr-interest-bounces at antlr.org] On Behalf Of Johannes Luber
> Sent: Tuesday, February 10, 2009 4:22 PM
> To: Jason Moore
> Cc: antlr-interest at antlr.org
> Subject: Re: [antlr-interest] Access Specifier for lexer's and parsers
>
> Jason Moore schrieb:
>> 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.
>>
>> Thanks,
>> Jason
>>
>> List: http://www.antlr.org/mailman/listinfo/antlr-interest
>> Unsubscribe:
> http://www.antlr.org/mailman/options/antlr-interest/your-email-address
>>
> Currently there is no way to do so. At least with the Java version of
> the tool. Sam Harwell is working a C# port with some extended features,
> which allows at least to use access modifiers on rules. Currently there
> is only a preview somewhere I can't find the link to - maybe Sam can
> help out? Otherwise I hope that things can be ported back to the Java
> original.
>
> Johannes
>
> List: http://www.antlr.org/mailman/listinfo/antlr-interest
> Unsubscribe:
> http://www.antlr.org/mailman/options/antlr-interest/your-email-address
>


More information about the antlr-interest mailing list