[antlr-interest] Rule methods are private (CSharp3 target)

Sam Harwell sharwell at pixelminegames.com
Tue Jul 21 11:30:12 PDT 2009


That's correct. Unless I reverted at some point, the C# port of ANTLR
generates code for the Java target the same way (it has a very slightly
altered template). The Java version of the tool allows but ignores the
public, protected, and private rule modifiers. All I did was implement
their support. :)

Sam

-----Original Message-----
From: antlr-interest-bounces at antlr.org
[mailto:antlr-interest-bounces at antlr.org] On Behalf Of Gavin Lambert
Sent: Monday, July 20, 2009 2:43 PM
To: Elnur Cabarov; antlr-interest at antlr.org
Subject: Re: [antlr-interest] Rule methods are private (CSharp3 target)

At 01:31 21/07/2009, Elnur Cabarov wrote:
>I use Antlr executable by Sam Harwell, but rule methods for 
>CSharp3 target are private, so I can't call them externally

Have you tried putting "public" in front of the rules you want to 
be callable?  (This doesn't make any difference to the Java 
target, but it's possible it does for CSharp3.  I haven't checked 
though.)


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