Compilerware
Open Source Fast LALR(k) Parser Generator
 DOWNLOADS 
AMDG
INTRODUCTION Downloads Feedback From Users Release Information PRODUCTS LRSTAR DFASTAR DFASTAR/c THEORY Definition Of Terms Theoretical Information COMPANY About Us Contact and Support  
Donate SourceForge Page

DFASTAR Lexer Generator 3.1 (with the 'c' option).

Description 

DFASTAR 3.1 has a 'c' option which tells it to create direct code lexical analyzers in C/C++ that run at 2.1 times the speed of FLEX lexers and 1% faster than RE2C lexers.  When compiled, the lexers can read tokens at a rate of 34,620,000 tokens per second.  The input to DFASTAR is LBNF grammar notation, which has the power of an LALR(1) grammar plus the addition of regular expressions in the right side of the rules. 

Direct-Code Lexers
DFASTAR can create direct-code lexers, similar to those created by RE2C.  However, the DFASTAR lexer, in our C-language test case, was 1% faster, 25% smaller and compiled 25% faster.  Testing has shown that direct-code lexers are 19% faster than table-driven lexers, if you need a line counter, and 11% faster, if you don't need a line counter.  Lexers built with DFASTAR can read up to 34,620,000 tokens/second.

Small Lexers
DFASTAR can create direct-code lexers that are about 25% smaller than lexers created by RE2C for the C language and about 50% smaller (half the size) for the DB2 language when the 550 keywords are included in the lexer. 

Generation & Build Time
For the lexer-build-time test, I used the lexical grammar for the DB2 language, which has 550 keywords.  This is one of the largest computer languages I have encountered and it is a good stress test for lexer generators.  For DFASTAR, the build time was 29 seconds.  For RE2C, the build time was 38 seconds.

DFAC = DFASTAR with the 'c' option.

© Copyright Compilerware 2012.  All rights reserved.