[antlr-interest] ANTLR 2.7.7 C# Parser fails WHILE ANTLR 2.7.7 JavaParser succeeds.....why?
Micheal J
open.zone at virgin.net
Wed May 23 10:12:35 PDT 2007
Hi,
> Hi all,
>
> First of all, thank you for this wonderful tool.
>
> I have developed a working parser (in Java) for a specific
> text format by using ANTLR 2.7.7. However, when i change the
> target language in my grammar file from Java to Csharp, I get
> a generated parser in C# which fails to parse the same input
> file which was successfully parsed by the Java counterpart.
>
> I have tried to compare the generated codes for both Java and
> C# and find them to be similar in behavior. First I thought
> there is some problem with my input streams (due to diff.
> Java and C# Stream Libs.) but I have tested that as well, I
> didnt find any problems there.
>
> Here is my grammar file:
<SNIP>
> In the Csharp version, I always get an exception: unexpected
> token 'end definition' .
>
> I can't figure out what to check now. I have exhausted all
> options I could think of. I am using antlr.bat provided with
> ANTLR 2.7.7 to generate my parsers.
>
> Regards,
> Atif Abdul-Rahman.
Can you attach the input file(s) in question plus the grammar file?
Micheal
-----------------------
The best way to contact me is via the list/forum. My time is very limited.
More information about the antlr-interest
mailing list