Given the range of languages / grammars already on Gold compared to Antlr and the range of development languages, You should really check out Gold for this, even if you stick with C as output:
http://www.devincook.com/GOLDParser/about/comparison-parsers.htm Overview The GOLD Parsing System is designed to aid in the development of compilers, interpreters and translators while supporting multiple programming languages. To accomplish this goal, the system takes advantage of the LALR and DFA algorithms. Both of these can be implemented with simple state transition graphs. As a result, it is very easy to write the algorithms in different programming language since the logic simply looks up a value in a table and then acts accordingly. The creation of these tables is where all the "thinking" takes place. The system is composed of two different components, the "Builder" and the "Engine", and the a file that is stores table information. The "Builder" constructs the parse tables. The "Engine" uses the tables. The Components The Builder The Builder is used to read a source grammar written in the GOLD Meta- Language, produce the LALR and DFA parse tables, and, finally, save this information to Compiled Grammar Table file. The Builder Application runs on the Windows 32-bit operating systems which include, but are not limited to, Windows 9x, Windows NT and Windows XP. The application also contains a number of features which could have been implemented as different programs. Each feature was included to create an easy-to-use integrated development environment. These include the ability to create skeleton programs and the ability to interactively test a grammar. There is also a command-line version of the Builder. In the future, the Builder may be ported to different operating systems such as UNIX, Linux, and Mac-OS. Compiled Grammar Table File The Compiled Grammar Table file is used to store table information generated by the Builder. The Engine The Engine component performs the actual parsing. The Engine can be developed in any programming language necessary. Since all the complex work was already performed the Builder, the Engine simply needs to read the Compiled Grammar Table file and implement the LALR and DFA automatas. As different implementations of the Engine are created for different programming languages, the approach and design will vary. Since different programming languages use different approaches to designing programs, each implementation of the Engine will be a little bit different. As a result, an implementation of the Engine written for Visual Basic 6 will differ greatly from one written for ANSI C. Due to the work of kind and generous contributors, there are numerous Engines at your disposal. Please visit the Engine Download page for some more information. -- You received this message because you are subscribed to the Google Groups "jallib" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/jallib?hl=en.
