Hi Ranco, I'll add a simple delegate grammar example to the tests I use here and find a way to make it work. :)
If you are using Visual Studio (or MSBuild in particular, which is the standard VS build system), then you'll definitely want to use the C# port of the tool. I highly recommend this route because it's both easy to work with and doesn't prod you to check your generated grammar files into source control. While the following documentation makes specific references to Visual Studio 2010, everything except section 1.1 (the IDE language support package) applies equally to Visual Studio 2008. http://www.antlr.org/wiki/display/ANTLR3/Antlr3CSharpReleases Thanks, Sam -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Ranco Marcus Sent: Wednesday, March 23, 2011 6:40 AM To: [email protected] Subject: [antlr-interest] [CSharp3] rule visibility in composite grammars Hi all/Sam, While using the CSharp3 target on a composite grammar, I came across a few issues regarding rule visibility. If no modifier (private, protected, public, ...) is specified for a rule, the Java target generates public methods (since it is not implemented IIRC) and the CSharp3 target generates private methods. I like the idea to explicitly specify which rules are callable (by making them public). However, for composite grammars the generated parser contains delegate rules for every rule of the imported grammar, even for rules in the imported grammar that aren't public (causing compile errors). This can solved this adding a public modifier to every rule of the imported grammar, but I was wondering if there's a more convenient way of doing this. Furthermore, the methods for the delegate rules in the composite grammars are all public, regardless of the visibility of the rule in the imported grammar. IMHO, it would be better to make them private and use the composite grammar to explicitly specify the rules that are externally visible. What are your thoughts on this? Btw, the CSharp3 templates are also included in the original Java tool. Does that mean that we don't need the .NET version of the tool anymore? Best regards, Ranco Marcus Epirion Knowledge Solutions B.V. List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address -- You received this message because you are subscribed to the Google Groups "il-antlr-interest" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/il-antlr-interest?hl=en.
