Re: Recovering from missing tokens (VBDis)
19 Nov 2004 00:53:49 -0500

          From comp.compilers

Related articles
Recovering from missing tokens (Lujop) (2004-11-17)
Re: Recovering from missing tokens (2004-11-19)
Re: Recovering from missing tokens (Lujop) (2004-11-20)
| List of all articles for this month |

From: (VBDis)
Newsgroups: comp.compilers
Date: 19 Nov 2004 00:53:49 -0500
Organization: AOL Bertelsmann Online GmbH & Co. KG
References: 04-11-063
Keywords: syntax, design
Posted-Date: 19 Nov 2004 00:53:49 EST

  Lujop <> 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.


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.