Steven Obua wrote:
On Jun 8, 2009, at 1:30 PM, Michael wrote:

  
I see.
Maybe one should find an example grammar which needs different lexers,
this is easy with an packrat grammar (since you have no lexer), but  
not so
with a normal lexer / parser combi.

    

It is really just a parsing question, the whole lexing issue is  
besides the point. Note that you can have ANTLR grammars without a  
lexer, just as in a packrat grammar.
  
No, it isn't. Even if you put your rules into 'literals'', ANTLR still produces a lexer; it isn't syntax directed lexing. However, if you have 'literals' only, then you should not end up with a an ambiguous lexer. The problems come from people turning on backtracking without a thought and just randomly typing; a good parser just doesn't happen that way :-)

Jim

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

List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe: 
http://www.antlr.org/mailman/options/antlr-interest/your-email-address

Reply via email to