Re: error recovery (Hank Dietz)
30 Apr 89 16:46:33 GMT

          From comp.compilers

Related articles
Re: error recovery (1989-04-30)
Error recovery (Cayot Robert-Olivier) (1997-03-21)
Re: Error recovery (Gord Cormack) (1997-03-22)
Re: Error recovery (Peter Whillance) (1997-03-27)
Error Recovery (1997-05-12)
Re: Error Recovery (1997-05-25)
Re: Error Recovery (Thomas W. Christopher) (1997-05-25)
[2 later articles]
| List of all articles for this month |

From: (Hank Dietz)
Newsgroups: comp.lang.c,comp.compilers
Summary: a lexical an. gen. & LL(1) parser gen. soon to be PD
Keywords: DFA, LL(1), recursive descent, attributed grammar
Date: 30 Apr 89 16:46:33 GMT
References: <510@lakart.UUCP> <4597@goofy.megatest.UUCP>

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.

PS: Some of you may recall me mentioning a lexer generator a while back...
        well, that's part of this package.

Post a followup to this message

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