Related articles |
---|
Can Pascal be parsed by LR(1) parsing algorithm? amb@apple.com (A. Michael Burbidge) (1990-10-09) |
Re: Can Pascal be parsed by LR(1) parsing algorithm? mauney@eos.ncsu.edu (1990-10-10) |
Re: Can Pascal be parsed by LR(1) parsing algorithm? hankd@dynamo.ecn.purdue.edu (1990-10-10) |
Re: Can Pascal be parsed by LR(1) parsing algorithm? joel@decwrl.dec.com (1990-10-15) |
Can Pascal be parsed by LR(1) parsing algorithm? meissner@osf.org (1990-10-10) |
Re: Can Pascal be parsed by LR(1) parsing algorithm? KARSTEN@tfl.dk (Karsten Nyblad, TFL, Denmark) (1990-10-10) |
Re: Can Pascal be parsed by LR(1) parsing algorithm? bliss@sp64.csrd.uiuc.edu (1990-10-10) |
Re: Can Pascal be parsed by LR(1) parsing algorithm? lindsay@comp.vuw.ac.nz (1990-10-16) |
Re: Can Pascal be parsed by LR(1) parsing algorithm? rekers@cwi.nl (1990-10-16) |
[9 later articles] |
Newsgroups: | comp.compilers |
From: | hankd@dynamo.ecn.purdue.edu (Hank Dietz) |
Summary: | It should be LL(1)... |
Keywords: | pascal, parse |
Organization: | Purdue University Engineering Computer Network |
References: | <9010091533.AA02386@apple.com> |
Date: | Wed, 10 Oct 90 17:16:40 GMT |
In article <9010091533.AA02386@apple.com> A. Michael Burbidge <amb@apple.com> writes:
>After struggling for some time to write a yacc description for the
>Pascal language and after reading the description of the modifier yacc
>contained in the UCB Pascal source directory I am beginning to wonder
>if an LR(1) parsing algorithm can parse Pascal. ...
Pascal is generally defined using a set of syntax diagrams which, by
definition, means the language can be recognized using LL(1). This
does not mean, however, that a particular Pascal dialect is LR(1);
there may be extensions or error handling states, etc., which cause
the language to not be LR(1).
Also, YACC builds LALR(1) parsers, not LR(1). I vaguely recall one of
Johnson's own papers saying something about a YACC-generated parser
not being able to parse YACC input because YACC input is LALR(2)...
so I'm not so sure that LALR(1) is equivalent to LALR(k). Or perhaps
the "convolutions" are VERY "unpleasant"?
-hankd@ecn.purdue.edu
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.