English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
[Caml-list] getting ocamlyacc to continue even after a parse error
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2001-10-26 (20:14)
From: Xavier Leroy <xleroy@p...>
Subject: Re: [Caml-list] getting ocamlyacc to continue even after a parse error
> How do I get ocamlyacc to generate a parser that continues parsing even
> after an error?

As briefly mentioned in the ocamlyacc manual (section 12.4.4),
ocamlyacc, like Yacc, supports error recovery via so-called error
tokens and error productions.  You'd better consult a good book on
Yacc (such as Levine's _Lex&Yacc_), because using error productions
effectively is a bit of a black art.

> I want to print all the errors in the code that's being
> parsed.

Good luck.

- Xavier Leroy
Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr