Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: "David Allsopp" <dra-news@metastack.com>
To: <caml-list@yquem.inria.fr>
Subject: Re: [Caml-list] Catching a double semicolon
Date: Wed, 7 Mar 2007 11:15:56 -0000	[thread overview]
Message-ID: <004a01c760a9$faaeaec0$6a7ba8c0@treble> (raw)
In-Reply-To: <20070306110003.AE491BC70@yquem.inria.fr>

> I wish there was a way to get debugging output when a  
> Parsing.Parser_error exception is triggered as I can't figure out  
> what rule the parser is chocking on when I try an expression with two  
> semicolons at the end.

Set the CAMLRUNPARAM environment variable to "p" and you will get debugging
output of the automata including error recovery attempts that lead to
Parse_error exceptions (see 10.2 in the manual). Be careful when you set it
though: it debugs *all* automata generated with ocamlyacc so remember to
unset it when running ocamlc or compilation will take some time! While it's
a pretty primitive debugging aid, in combination with ocamlyacc -v I find it
sufficient to diagnose most grammar errors...


David 


           reply	other threads:[~2007-03-07 11:15 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <20070306110003.AE491BC70@yquem.inria.fr>]

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='004a01c760a9$faaeaec0$6a7ba8c0@treble' \
    --to=dra-news@metastack.com \
    --cc=caml-list@yquem.inria.fr \
    /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