[antlr-interest] Parsing names

alan brown listbrownie at gmail.com
Mon Mar 17 20:48:29 PDT 2008


I'm having a problem with my lexer/parser design.  I'm trying to parse a
poker hand history file and extract the relevant information.  I got a
working solution but it's quite brittle.  My problem is that my lexer is
creating tokens of the words and my parser is reading those words to work
out player names and bets and so on.  My issue is that the player names
(among other things) is causing me grief.  A player name can be "alan 10
folds" which as you might imagine, can cause some confusion.

What I'd like to do is to parse the file to create the tokens that the lexer
would look for so when my parser runs over the tokens all the names are
single tokens.

How do I dynamically define the tokens for the lexer to parse?

alan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20080317/5a17db39/attachment.html 


More information about the antlr-interest mailing list