[antlr-interest] Parsing names
    Austin Hastings 
    Austin_Hastings at Yahoo.com
       
    Mon Mar 17 20:54:29 PDT 2008
    
    
  
Alan,
1. How about giving us some example text?
2. Create a symbol table. This is a "higher level" solution, but 
probably right.
3. It may be that your text is more amenable to parsing with a "lower 
level" approach. Possibly more use of regular expressions is needed.
Before you make any permanent decisions, see #1.
=Austin
 alan brown wrote:
> 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
    
    
More information about the antlr-interest
mailing list