LRGEN is now LRSTAR 1.0: fast LALR parser generator

"Paul B Mann" <>
Sat, 31 Jul 2010 03:17:33 -0500

          From comp.compilers

Related articles
LRGEN is now LRSTAR 1.0: fast LALR parser generator (Paul B Mann) (2010-07-31)
| List of all articles for this month |

From: "Paul B Mann" <>
Newsgroups: comp.compilers
Date: Sat, 31 Jul 2010 03:17:33 -0500
Organization: Compilers Central
Keywords: parse, tools
Posted-Date: 31 Jul 2010 16:51:18 EDT

The product name, LRGEN, has been changed to LRSTAR. Potential legal
problems with the name LRGEN have caused me to reconsider. Also the
new product is different than the old LRGen product. No need for any
more confusion in this industry.

I chose LRSTAR for the new name. Hopefully, that is OK, with
everybody. There is a slightly improved version now for download at:

It also contains DFAC.1.0.366.win32 inside. So, no need to download
both products. The DFAC download is for those who only want a lexer


I received a message about the lexer speed that might be useful to
others so I mention that here:


Did you compare DFAC to PCRE?


I compared it to RE2C and FLEX, but not PCRE.
The test framework is in the download on the home page at:

Download: and run the program.
Check the speed about 10 times. Write down the fastest one.
Then replace the 'lexer.c' file with another lexer and re-run
the program 10 times and write down the fastest time.

Does PCRE run on Window XP ? Most of the lexer generators
are Linux or UNIX and would not compile with Visual C++.

During my testing for over one month, I compared theoretical
maximums also. My DFAC (not released to the public) can
generate 4 table-driven lexer formats:

small, medium, large and extra-large.

The fastest one can read 44,000,000 tokens per second in my test
framework, but the lexers are extremely large. That means you get a
lexer that is 30% faster and 20 times larger -- probably not desirable
for most people. So, I only allow small and medium lexers in the
released version, for practical purposes.

Besides, when you add a line counter to the large and extra-large
lexers, the speed drops dramatically to nearly the same as the
medium-size lexers.

If you need a content filter for networks and size does not matter,
then contact me about a special version for your project.

Paul B Mann

Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.