Hi, I have released DFAC, a DFA lexer generator for C/C++. It is freeware.
It should work with ANTLR, however, I have not tried it yet to see if the generated lexers actually compile and run with ANTLR parsers. Why? Because I am not an ANTLR user at this time. I'm an LALR kind of guy working with Microsoft Visual C++. My testing of DFAC against 'flex' and 're2c' has shown that DFAC creates lexers that are 2.1 times the speed of 'flex' lexers and 1% faster than 're2c' lexers. DFAC lexers are 25% smaller than 're2c' lexers for the C language and 50% smaller for the DB2 language (when having the lexer do keyword recognition). That brings up a nice feature of DFAC. It recognizes keywords and identifiers at the same time (faster than having the symbol table recognize the keywords). Also, you don't have to be concerned about the order of the rules in the lexical grammar input to DFAC. It solves the keyword-identifier ambiguity problem. Yes, DFAC reads a real lexical BNF grammar notation which is actually more powerful than regular expressions (or at least more readable). If you have ever tried to define a C-like comment with regular expressions, you might appreciate the way DFAC lets you do it. DFAC works very well with Microsoft Visual C++ 2008, by providing VS type error messages. Just click on the error message and it takes you to the source line causing the error. You can download DFAC at CompilerWare for FREE: http://compilerware.com You are welcome to send comments or questions to me at [email protected] I never get tired of talking about this subject, and I've been doing this since 1978. I must be nuts, huh? Regards, Paul B Mann List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address -- You received this message because you are subscribed to the Google Groups "il-antlr-interest" 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/il-antlr-interest?hl=en.
