|The Dragon Parser Generator|
by Bjoern Lemke, 01.09.2007
Cego comes under the GNU Copyright
(C)opyright 2000-2016 by Bjoern Lemke
Also there are ( beside of lex and yacc) a lot of parser generation tools are available, this is another implementation of a powerful parser generator. The dragon approach results in a consequent object oriented integrated scanner and parser solution and scales also for very large grammar defintions.
Since dragon parses LR(1) grammars, the generation algorithm is quite cpu intensive building the sets of LR(1) elements. Using LR(1) instead of LALR decreases efficiency of the parser but avoids some reduce/reduce conflicts in some cases. For huge grammar defintions, state-of-the-art hardware ( especially CPU ) is strongly recommended.
Dragon provides a very clean and structured way for the integration application specific context code. Further, dragon combines the lexical and syntactical analysis and the corresponding code generation. The grammar is completely defined in a single description file.
As a result, dragon generates C++ class code that can be in included as a parser class. From version 1.2, dragon also supports generation of Java code. The code integration and usages is quite similar.
From dragon version 1.3, LALR parser generation mode is also supported and is used as default.
If you have built and tested the dragon software and find it useful ( or not ), I appreciate some feedback from you. Thanks in advance !
|1||Who should use it ?|
|2.1||... Java code generation|
|2.2||... C++ code generation|
|4||Generating the parser|
|4.1||... Parser conflicts|
|4.1.1||... Shift/reduce conflict|
|4.1.2||... Reduce/reduce conflict|
|5||Parser analysis mode|
|6||Advanced scanner feed|
|7.1||... Sample action method|
|8||Advanced scanner feed|
|9||Parser analysis mode|