From: | kanze@gabi-soft.fr (J. Kanze) |
Newsgroups: | comp.compilers |
Date: | 16 Feb 1997 22:54:08 -0500 |
Organization: | GABI Software, Sarl. |
References: | 97-01-013 97-01-236 97-02-038 |
Keywords: | parse, Pascal |
iainf@bristol.st.com (Iain A F Fleming) writes:
> kanze@gabi-soft.fr (J. Kanze) wrote:
> > even Pascal requires some hacks.
> In my recollection, only in parsing (0.1 vs 0..1), though "with"
> clauses can be a bit tricky regarding sematic analysis. (though I may
> be wrong, as I haven't worked on a pascal compiler for about 7 years).
Actually, the specific case I was thinking about was the distinction
between an assignment statement and a procedure call. I actually think
that you could write an LR grammar which would work even if the scanner
returned user symbol in both cases, but it would be complicated. The
usual solution is for the scanner to do a symbol table lookup, and
return a different token if the symbol is defined as a procedure. In
short, a hack.
--
James Kanze +33 (0)1 39 55 85 62 email: kanze@gabi-soft.fr
GABI Software, Sarl., 22 rue Jacques-Lemercier, 78000 Versailles, France
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.