LL(1)ish Ada grammar?

andrewd@cs.adelaide.edu.au (Andrew Dunstan)
Sat, 16 May 1992 07:08:35 GMT

          From comp.compilers

Related articles
LL(1)ish Ada grammar? andrewd@cs.adelaide.edu.au (1992-05-16)
| List of all articles for this month |

Newsgroups: comp.compilers,comp.lang.ada
From: andrewd@cs.adelaide.edu.au (Andrew Dunstan)
Keywords: Ada, parse, LL(1)
Organization: Compilers Central
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: andrewd@cs.adelaide.edu.au

Post a followup to this message

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