caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] getting ocamlyacc to continue even after a parse error
@ 2001-10-25 10:09 Rafael 'Dido' Sevilla
  2001-10-26 12:36 ` Xavier Leroy
  0 siblings, 1 reply; 2+ messages in thread
From: Rafael 'Dido' Sevilla @ 2001-10-25 10:09 UTC (permalink / raw)
  To: Caml List

How do I get ocamlyacc to generate a parser that continues parsing even
after an error?  I want to print all the errors in the code that's being
parsed.

-- 
Rafael R. Sevilla <sevillar@team.ph.inter.net>   +63(2)   8177746 ext. 8311
Programmer, Inter.Net Philippines                +63(917) 4458925
http://dido.engr.internet.org.ph/                OpenPGP Key ID: 0x5CDA17D8
-------------------
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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Caml-list] getting ocamlyacc to continue even after a parse error
  2001-10-25 10:09 [Caml-list] getting ocamlyacc to continue even after a parse error Rafael 'Dido' Sevilla
@ 2001-10-26 12:36 ` Xavier Leroy
  0 siblings, 0 replies; 2+ messages in thread
From: Xavier Leroy @ 2001-10-26 12:36 UTC (permalink / raw)
  To: Rafael 'Dido' Sevilla; +Cc: Caml List

> 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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2001-10-26 20:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-10-25 10:09 [Caml-list] getting ocamlyacc to continue even after a parse error Rafael 'Dido' Sevilla
2001-10-26 12:36 ` Xavier Leroy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).