[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ale] [OT] Writing a parser



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