At 08:14 3/07/2009, Penningroth, Mark wrote:
 >line 1:7 no viable alternative at input '"[Measures].[Unit
 >Sales]"'

You need to change the grammar at this point to be expecting a 
DQTEXT instead of whatever it is now, and remove any other 
double-quote matching from your grammar.

Remember that the lexer runs up front without any context, and 
produces tokens from your input.  There should be no ambiguity 
between lexer rules; don't try to make contextual decisions 
(including checking for characters that are valid in some cases 
but not others) until at least the parser level.

You will often find this process easier if you ensure that none of 
your parser rules use 'string constants like this' -- all that 
ends up doing anyway is creating a lexer rule.  It's better to be 
explicit about this; not only do you get a better-named token that 
way, but it's also easier to see possible conflicts between your 
lexer rules.


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
-~----------~----~----~----~------~----~------~--~---

Reply via email to