Examining state/transition graphing to extend BasicParse (or rather rewrite it)

The old parser was just too ugly to leave sitting around so I've implemented a slightly more modularized version using actual compiler techniques.  Here is the skinny:

Abstract:
The previous parser was a linear parser.  All state was handled in a single parsing function with some stream operation helper functions for working with the token stream.  This isn't necessarily the most effective method in generating a parser, though it does lead to relatively short development times.  In the end the parser feels and looks hacked together, so we are going to use a different approach in this article. 

A parser can be defined by a State/Transition graph.  Basic states allow us to select functions to continue with the parsing of the underlying stream in a more meaningful or contextual manner.  Transitions are changes from one state to another.  The result of each transition should be the new state into which the parser is going to enter.  The end result of the process will be a far more modularized, and possibly a more compact form parser as the project grows in complexity and size.

You can find the article here: BasicParse with State/Transition graphing, a much more robust parser.

Published Sunday, May 16, 2004 8:11 PM by Justin Rogers

Comments

Thursday, May 20, 2004 11:12 AM by TrackBack

# Short on time but here's some important parsing stuff...

Leave a Comment

(required) 
(required) 
(optional)
(required)