Hi all,
During my work with my Pas2C64 parser I have been working on, I decided to create a generic parser class that anyone can use as a starting point, and sub-class it to make more specific parsers

Here is the base parser and base parser type units (with .txt after the .pas to allow uploading):
unit_base_parser.pas.txt
unit_base_parser_types.pas.txt

I have based it on the recursive descent parser shown here (C code):
http://en.wikipedia.org/wiki/Recursive_descent_parser

You must subclass the parser to use it. See the attached file below (with .txt after the .dpr):
parser_test.dpr.txt

You Register all generic tokens and keyword tokens with the parser (see the base parser file for an example; this can be moved into a concrete parser types file (or similar) if you prefer).

You then test for the token values in the parser just like in the attached program example

Enjoy!

cheers,
Paul