Hi Simon,
Using the 3.3.1 build I posted last night, the only issue with the C# target
is the use of {$channel=HIDDEN;}. To match .NET naming conventions, the
hidden channel constant is Hidden, so they need to be changed to
{$channel=Hidden;}.I updated the grammar you sent by: 1. Fixing the CSharp3 build issue (requires the 3.3.1 build I posted last night). 2. Left factoring to remove the backtrack, memoize, and k=2 options. 3. Using the extended AST operators of the CSharp3 target to remove unnecessary rewrite rules. I haven't tested the result aside from making sure it compiles properly with the CSharp3 target. Sam -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Simon Sent: Wednesday, February 16, 2011 1:42 AM To: [email protected] Subject: Re: [antlr-interest] Compile errors with CSharp2 Target On Wed, Feb 16, 2011 at 10:47 AM, Johannes Luber <[email protected]> wrote: > Did you read the other emails stating you may have a grammar which is meant to work with Java? If possible pls attach the grammar to the email, so we can check this and any other errors. I forgot which ANTLR versions require what runtimes exactly, but you need 3.1 or 3.2 for CSharp2. CSharp3 requires ANTLR 3.3 and other assemblies than I've provided, as the targets aren't compatible with each other yet. Not sure if those assemblies are provided in distro or where else you can find them. Sam should know more. Ah, thanks to everyone for pointing out the obvious - I looked more thoroughly in the grammar and in the end did find some stray bits of Java code which, once eliminated let it compile just fine using CSharp2. I still have the same errors with CSharp3 (incorrect escape sequences when generated with antlr 3.1.3, different errors with antlr 3.3). I've attached the "purified" Php.g grammar that succeeds in CSharp2 but fails in CSharp3 in case it is useful - however I think I will proceed with CSharp2 at this point. Thanks again for the help! Simon
List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address
Php.g
Description: Binary data
-- 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.
