|Recovering from missing tokens firstname.lastname@example.org (Lujop) (2004-11-17)|
|Re: Recovering from missing tokens email@example.com (2004-11-19)|
|Re: Recovering from missing tokens firstname.lastname@example.org (Lujop) (2004-11-20)|
|Date:||19 Nov 2004 00:53:49 -0500|
|Organization:||AOL Bertelsmann Online GmbH & Co. KG http://www.germany.aol.com|
|Posted-Date:||19 Nov 2004 00:53:49 EST|
Lujop <email@example.com> schreibt:
>I have a pseudocode language similar to java.
Your language is more Pascal than Java.
>If for example the user forgot to put the const token. What is the
>best way to solve the error and recovery from it?
In Pascal a distinction is made between sections of type "const",
"type", "var" etc. Everything not fitting into the actual section can
only be a procedure declaration or definition. In Pascal also all
declarations are terminated with a semicolon, which can be used as a
recovery point after an syntactical error. Code has to be enclosed in
"begin"/"end" pairs, also useful as recovery points.
Return to the
Search the comp.compilers archives again.