I kind of got turned off when CSharp3 target was first introduced and the code template had bugs in it. For example, at the end it would print out a single line comment with the keyword namespace and the name of the namespace (i.e. // namespace foo). The problem was somebody put a newline after the "//" and so "namespace foo" was taken in as code and caused even simple grammars to generate syntactically incorrect code. This wasn't the only bug. I basically had to modify the code template, but good luck trying to figure out how to do that and still use Antlrworks. I basically used 7zip to unzip the Antlrworks.jar file, locate the csharp code template, change it, then use java to archive it back into a jar and run it. I will say, though, that I enjoy now knowing how to control other aspects of the generated code (like the visibility of the class, which really should just be an antlr option considering how dead simple it would be to implement (but I'll leave that alone)). Anyway, if you are having any issues with the generated code, try the above approach to get Antlrworks to use your own modified template.
On Wed, Oct 19, 2011 at 9:59 AM, Sam Harwell <[email protected]>wrote: > Hi Andy & Maik, > > I agree that the C# target documentation is lacking in many ways. I try to > keep enough documentation at the following page to get you started on the > right path: > http://www.antlr.org/wiki/display/ANTLR3/Antlr3CSharpReleases > > I've been using the CSharp3 target in a commercial product for 3 years now. > At this point, most of the remaining the issues I have with it are > basic/technical limitations of ANTLR 3 that will hopefully be resolved in > later versions. > > Sam > > -----Original Message----- > From: [email protected] > [mailto:[email protected]] On Behalf Of pragmaik > Sent: Wednesday, October 19, 2011 9:36 AM > To: [email protected] > Subject: Re: [antlr-interest] How viable is the Csharp3 target? > > Hi Andy! > > I am using ANTLR's C# target for a couple of weeks now to create a domain > specific language that is a subset of the C programming language. > > My experience is similar to yours, but I can assure you that the C# target > works and that it is actively maintained. It differs from the Java target > in > a few places, but it works. > > The biggest problem is finding documentation. I've both of Terence Parr's > books on my desk and the folks on this mailing list are very friendly and > competent. > > Cheers, > Maik > > > -- > View this message in context: > > http://antlr.1301665.n2.nabble.com/How-viable-is-the-Csharp3-target-tp690889 > 0p6908949.html > Sent from the ANTLR mailing list archive at Nabble.com. > > 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 > 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.
