Browse thread
ocamlyacc error reporting
- Markus Mottl
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Markus Mottl <mottl@m...> |
| Subject: | ocamlyacc error reporting |
Hello,
it would be great if "ocamlyacc" reported more errors on badly specified
grammars. Some difficult to spot mistakes could then be resolved more
easily.
E.g.:
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