GOLD Parser Engine Source Code
The GOLD Parser is a new, free parser generator that you can use to develop your own compilers and emulators. It strives to be a development tool that can be used with numerous programming languages and on multiple platforms while maintaining modern design concepts.
Modern bottom-up parsers use a Deterministic Finite Automaton (DFA) for identifying different classes of tokens and a LALR(1) state machine to parse them. The actual LALR(1) and DFA algorithms are easy to implement since they rely on tables to determine actions and state transition. Consequently, it is the computing of these tables that is both time-consuming and complex.
The GOLD Parser Builder performs this task; reading from a source grammar outline and then computing the appropriate tables. This information is then saved to a Compiled Grammar Table file which can be, subsequently, loaded by the actual parser engine and used.
NEW! The source code for the GOLD Parser Engine is finally available to download. The zip file contains the Visual Basic source code used to implement the ActiveX Engine. In other words, this code includes the DFA and LALR algorithms.
In the future, the source will be ported to as many programming languages as possible. If you would like to port the code to another language, your work will be deeply appreciated.
The parse tree sample project, I posted on Planet Source Code a couple weeks ago, is included with this download. This is a simple project which loads a Compiled Grammar Table file and draws a parse tree for a given input string. The project parses an example grammar called "Simple".
To download the GOLD Parser Builder, please visit http://www.DevinCook.com/GOLDParser
Enjoy, and happy programming!
Original Author: Devin Cook
About this post
Posted: 2002-06-01
By: ArchiveBot
Viewed: 172 times
Categories
Attachments
GOLD_Parse616363122002.zip
Posted: 9/3/2020 3:45:00 PM
Size: 36,120 bytes
Loading Comments ...
Comments
No comments have been added for this post.
You must be logged in to make a comment.