[ale] [OT] Writing a parser

Denny Chambers dchambers at bugfixer.net
Thu Mar 18 10:39:25 EST 2004


Everyone has given you some good information, I just wanted to add a 
little more detail to that. First before you run and jump feet first in 
flex/lex, make sure you understand regular expression. Regular 
expressions is what you will use to define the tokens that will be 
passed to the parser. Before you start on the parser, make sure you 
understand how to write a Grammar. The Grammar is what will define the 
syntax for what you are parsing.

Denny

Kevin Krumwiede wrote:

>I am working on a program to capture data from a MUD (actually, TW2002).
> I've looked at the source for a couple parsers, including one made
>specifically for that game, but because they are generated code I'm
>having a lot of difficulty understanding how they work.  
>
>The gist of what I do understand is this (and somebody please tell me if
>I'm wrong): parsers generally take a string of text and return a numeric
>code signifying what pattern (if any) the text matches.  A program can
>then use that code to decide how to process the text.  I assume that
>sophisticated parsers take into account the preceding context of the
>text when evaluating its pattern.
>
>I am completely lost when it comes to the input languages of parser
>generators.  Anyone know of a good tutorial?
>
>Thanks,
>Krum
>_______________________________________________
>Ale mailing list
>Ale at ale.org
>http://www.ale.org/mailman/listinfo/ale
>
>
>  
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3190 bytes
Desc: S/MIME Cryptographic Signature




More information about the Ale mailing list