Well the hint is that your grammar is wrong. But you need to post your grammar to get more help :-). I think, from the way you describe your problem, that perhaps you have ambiguous lexer rules and think that the parser influences what lexer rule is run, which it does not.
Also, make sure you run the debugger in AntrlWorks and check any warning messages when you generate the code. Jim > -----Original Message----- > From: [email protected] [mailto:antlr-interest- > [email protected]] On Behalf Of Hélder Silva > Sent: Friday, April 08, 2011 3:46 AM > To: [email protected] > Subject: [antlr-interest] Diferent output when running ANTLRWorks IDE > and a test rig in both Java and C# versions > > I’m getting different results when i run a certain input on the IDE in > comparison to a test rig in either Java or C# as well. > > > > In the IDE, for a given input, I get a NoViableAltException, which is > what I want to happen. > > > > When running the same input on Java test rig I get this: > > line 1:3 mismatched character ' ' expecting '@' > > line 1:4 required (...)+ loop did not match anything at input 'helium' > > The “expecting ‘@’” i suppose the parser is looking for another token I > have in which it matches an email address, but no rule I have starts > with an email address either. > > > > In the C# test rig, the parser complains there is no input with the > message: > > line 1:4 required (...)+ loop did not match anything at input 'helium' > > can someone give me a hint on what’s happening here? > > > > > 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.
