Newsgroups: | comp.compilers |
From: | firth@sei.cmu.edu (Robert Firth) |
Keywords: | pascal, parse |
Organization: | Software Engineering Institute, Pittsburgh, PA |
References: | <9010091533.AA02386@apple.com> |
Date: | 17 Oct 90 19:04:57 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. The version of yacc
>used with the UCB Pascal claims to have additional lookahead sets. Can
>anyone shead any light on this subject. The optional semi-colons seem
>to be very difficult to deal with.
Many moons ago, I wrote a front end for Pascal, and don't recall
having any trouble except the dear old stupid "1.5" versus "1..5",
which needs a two-character lookahead in the lexer.
Moreover, I've just checked both Wirth's original paper and a
couple of books on Pascal, and can't find ANY optional semicolons
in the grammar.
If you could post a little more detail, I'll try to be more helpful!
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.