Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
* Re: [Caml-list] Catching a double semicolon
       [not found] <20070306110003.AE491BC70@yquem.inria.fr>
@ 2007-03-07 11:15 ` David Allsopp
  0 siblings, 0 replies; only message in thread
From: David Allsopp @ 2007-03-07 11:15 UTC (permalink / raw)
  To: caml-list

> 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 


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-03-07 11:15 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20070306110003.AE491BC70@yquem.inria.fr>
2007-03-07 11:15 ` [Caml-list] Catching a double semicolon David Allsopp

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox