hankd@ee.ecn.purdue.edu (Hank Dietz) (04/30/89)
An MS student of mine named Terence Parr has been building a really spiffy lexical analyzer generator and LL(1) parser generator program for his MS thesis. It accepts a yacc+lex-like input syntax, but generates BOTH parser and lexer from a single unified description. Beyond that, it accepts the usual EBNF extensions for 0-or-more, alternative, and optional subrules and supports dynamically-allocated/deallocated attributes (e.g., by default, all $ variables are variable-length strings). The lexers generated are DFAs very similar to those built by lex, but with a more direct implementation (bigger but faster). The parsers are recursive descent C code, but use switches and mapping tables where appropriate, rather than the usual binary comparisons, to find the next alternative to apply and to give rather decent error messages (based on first sets). In non-trivial test cases, the recognizers it builds have run consistently upwards of 25K lines per second.... We will be putting this stuff in PD within the next few months. If anyone is interested in testing "alpha" versions of the package, send me email. -hankd@ee.ecn.purdue.edu PS: Some of you may recall me mentioning a lexer generator a while back... well, that's part of this package. -- Send compilers articles to compilers@ima.isc.com or, perhaps, Levine@YALE.EDU Plausible paths are { decvax | harvard | yale | bbn}!ima Please send responses to the originator of the message -- I cannot forward mail accidentally sent back to compilers. Meta-mail to ima!compilers-request