Related articles |
---|
Recovering from missing tokens lujoplujop@gmail.com (Lujop) (2004-11-17) |
Re: Recovering from missing tokens vbdis@aol.com (2004-11-19) |
Re: Recovering from missing tokens lujoplujop@gmail.com (Lujop) (2004-11-20) |
From: | vbdis@aol.com (VBDis) |
Newsgroups: | comp.compilers |
Date: | 19 Nov 2004 00:53:49 -0500 |
Organization: | AOL Bertelsmann Online GmbH & Co. KG http://www.germany.aol.com |
References: | 04-11-063 |
Keywords: | syntax, design |
Posted-Date: | 19 Nov 2004 00:53:49 EST |
Lujop <lujoplujop@gmail.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.
DoDi
Return to the
comp.compilers page.
Search the
comp.compilers archives again.