Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
ocamlyacc error reporting
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Markus Mottl <mottl@m...>
Subject: ocamlyacc error reporting

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,,