Newsgroups: | comp.compilers |
From: | firth@sei.cmu.edu (Robert Firth) |
Keywords: | pascal, parse |
Organization: | Software Engineering Institute, Pittsburgh, PA |
References: | <9010091533.AA02386@apple.com> <1990Oct10.133752.14930@ncsuvx.ncsu.edu> |
Date: | 17 Oct 90 19:10:36 GMT |
In article <1990Oct10.133752.14930@ncsuvx.ncsu.edu> mauney@eos.ncsu.edu (Jon Mauney) writes:
>Berkeley Pascal was, for some time, unable to accept a null
>statement in the "then" clause:
>
> if i<0 then else foo(i);
But that is not legal Pascal. The relevant syntax (Wirth, section 9.2.2.1)
reads
<if-statement> ::= IF <expression> THEN <statement> |
IF <expression> THEN <statement> ELSE <statement>
and there is no production from <statement> that yields <empty>.
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.