LRGen LALR/LR(1) Parser Generator & DFA Lexer Generator LRGEN.COM
AMDG
 
   
Description
Feedback
Screen Shot
Overview
Papers
History
Links

LRGen 8.3

LRGen 8.3 Standard.
(1)  SLR(1) parser generator.
(2)  SLR(1) lexer generator.
(3)  Integrated symbol-table builder.
(4)  Abstract syntax tree construction.
(5)  Intermediate code generation.
(6)  Compiler front end source code in C++.
(7)  Grammars:  Calculator.

Free download ...
 
  LRGen 8.3 Professional.
(1)  LALR/LR(1) parser generator.
(2)  LALR/LR(1) lexer generator.
(3)  Integrated symbol-table builder.
(4)  Abstract syntax tree construction.
(5)  Intermediate code generation.
(6)  Compiler front end source code in C++.
(7)  Better parser-table compression.
(8)  Fast DFA lexer generation.
(9)  Grammars:  Ada, C, C++, CICS, COBOL, dBASE, FORTRAN, Modula2, Pascal, PL/I, PL/M, SQL, Visual Basic, XPL, Zeus.
License ... Contact us.

World's Fastest Lexers & Parsers *
LRGen creates the world's fastes lexers and parsers in C/C++.  We did the research and created the fastest algorithms, portable to many programming languages, but we think C/C++ gives you the best performance.  Our innovative 4-matrix-parser tables and optimization techniques also contribute to the high-performance of the language processors.  HTML, XML, C, C++, Java, SQL, COBOL and other languages can be processed with our generalized compiler front end.  [* Based on our experience]

LR Finite-State Machines
LRGen builds LALR/LR(1) parsers and DFA lexers as finite-state machines, a concept invented by Donald Knuth [1965] and made practical by Frank DeRemer [1969].  LRGen 8.3 offers a new option, fast DFA lexers.  Using the DFA option, a language processor built with LRGen, can process 10 MB of text (XML, HTML, C++, Java, etc.) in 0.609 seconds on a 3 GHz computer.  Here is a chart showing the different parts of the language processor and their execution times when reading a 72,000-line file.

Process With DFA Lexer With LR Lexer
Lexer 0.078 sec12% 0.437 sec45%
Parser 0.125 sec21% 0.125 sec13%
Symbol Table 0.124 sec21% 0.124 sec13%
AST Creation 0.126 sec21% 0.126 sec13%
Input/Output 0.155 sec25% 0.155 sec16%
TOTAL TIME 0.609 sec100%0.968 sec100%
SPEED 118,000 lines/sec74,000 lines/sec

Very Small Parsers
LRGen generates LR(1) parser tables that are very small in size.  The DFA lexer tables are less than 3,000 bytes for most languages.  Below is a table showing parser-table sizes (in bytes) for some languages.

Language Grammar Rules Parser Table Size
Ada 414 13,789
C 222 6,177
C++ 307 10,967
COBOL 1,045 29,909
DB2 1,868 66,374
Lotus Script 767 28,400
Oracle SQL 1,321 44,116
PL/I 1,275 31,015
Visual Basic 478 18,113
XPL 109 2,465

World's Most Powerful BNF Notation
LRGen reads TBNF grammar notation, the most powerful language for defining translators, interpreters and compiler front ends.  We invented TBNF so that you don't have to write tons of code to get your project finished.  Abstract-syntax trees (not parse trees) are created automatically.  Intermediate code can be generated automatically.  Context sensitive language constructs can be handled automatically.

LBNF Grammar Notation
LRGen reads LBNF grammar notation, for generating lexers.  LBNF is Extended BNF grammar notation which is more readable than regular expressions and more powerful.  With LBNF it is easy to specify difficult input sequences such as nested comments. 

Generate Source Code In Any Language
LRGen grammars are language independent because you don't put source code in the grammar.  Therefore, LRGen can use a skeleton parser input file which tells it how to format the parser-table source code that it generates.  By changing the parser skeleton and lexer skeleton, you can change the generated source code to another programming language.  Users have been able to generate code in Pascal, C# (sharp), IBM Assembly Language and others.

Works With Microsoft Visual Studio C/C++
LRGen is a command-line program without a fancy IDE, however, it comes with project files for working with Visual Studio 2005.  We would like to have a fancy IDE for LRGen, but we're not there yet.  We have put our efforts into other things which the competition does not yet offer, such as performance and automating the whole development process. 

© Copyright 2007 Parsetec