ocamlyacc error reporting

From: Markus Mottl (mottl@miss.wu-wien.ac.at)
Date: Wed Apr 14 1999 - 19:45:18 MET DST

From: Markus Mottl <mottl@miss.wu-wien.ac.at>
Message-Id: <199904141645.SAA04614@miss.wu-wien.ac.at>
Subject: ocamlyacc error reporting
To: caml-list@inria.fr (OCAML)
Date: Wed, 14 Apr 1999 18:45:18 +0100 (MET DST)


it would be great if "ocamlyacc" reported more errors on badly specified
grammars. Some difficult to spot mistakes could then be resolved more


  main : SOME_TOKEN foo {}
  foo : main {}

It is impossible to derive any sentence from this grammar - still, there
is no error/warning. But also parts of a grammar can be underivable. This
can be very difficult to see in large grammars.

I have tried this example with "bison" and it can report such errors. This
is not the case with "yacc", but since ocamlyacc is based on "yacc"-code,
this is understandable...

Best regards,
Markus Mottl

Markus Mottl, mottl@miss.wu-wien.ac.at, http://miss.wu-wien.ac.at/~mottl

This archive was generated by hypermail 2b29 : Sun Jan 02 2000 - 11:58:22 MET