|LL(1)ish Ada grammar? email@example.com (1992-05-16)|
|From:||firstname.lastname@example.org (Andrew Dunstan)|
|Keywords:||Ada, parse, LL(1)|
|Date:||Sat, 16 May 1992 07:08:35 GMT|
I don't want to get into the top v bottom argument just yet :-) but
I do need (if such a thing exists) an LL1-ish grammar for Ada.
Reason: I am writing a parser generator (table-driven, top down) which
takes as its input an LL1 type grammar. It can handle ambiguity, but the
grammar must not be left-recursive and must be left factored. I want to
put it through its paces with a monster of a grammar, and couldn't think
of anything better than Ada (no, Cobol won't do!)
(comp.lang.ada note: of course I am writing it in Ada!)
Why this scheme of parser? There are many reasons, but one is that the
rather unconventional error recovery scheme involves growing and/or
shrinking the prediction stack, and this is much easier this way than with
a bottom up parser or a recursive descent parser.
# Andrew Dunstan
# Department of Computer Science
# University of Adelaide
# South Australia
# net: email@example.com
Return to the
Search the comp.compilers archives again.