|Interactive stamtment execution firstname.lastname@example.org (Elliot H. Mednick) (1992-07-29)|
|Re: Interactive statement execution email@example.com (1992-08-04)|
|From:||firstname.lastname@example.org (Rich Skrenta)|
|Organization:||Northwestern University, Evanston, Illinois|
|Date:||Tue, 4 Aug 1992 03:11:30 GMT|
email@example.com (Elliot H. Mednick) writes:
> In "interactive mode", entering declarations would be
> illegal; only the statements would be allowed.
Assuming that you don't allow interactive mode to declare variables
because you've already chosen a scope, it sounds like you only
want to allow the user to type executable statements. You could
limit interactive mode to the tree rooted at statement_list.
One trick to do this might be to have the lexer cough up a special
token before interactive input:
| INTERACTIVE statement_list
: header declaration statment_list
Return to the
Search the comp.compilers archives again.