caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Xavier Leroy <xleroy@pauillac.inria.fr>
To: "Rafael 'Dido' Sevilla" <sevillar@team.ph.inter.net>
Cc: Caml List <caml-list@pauillac.inria.fr>
Subject: Re: [Caml-list] getting ocamlyacc to continue even after a parse error
Date: Fri, 26 Oct 2001 14:36:42 +0200	[thread overview]
Message-ID: <20011026143642.E32249@pauillac.inria.fr> (raw)
In-Reply-To: <20011025180922.A5918@team.ph.inter.net>; from sevillar@team.ph.inter.net on Thu, Oct 25, 2001 at 06:09:22PM +0800

> 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


      reply	other threads:[~2001-10-26 20:14 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-10-25 10:09 Rafael 'Dido' Sevilla
2001-10-26 12:36 ` Xavier Leroy [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20011026143642.E32249@pauillac.inria.fr \
    --to=xleroy@pauillac.inria.fr \
    --cc=caml-list@pauillac.inria.fr \
    --cc=sevillar@team.ph.inter.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).