[
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: | David Mentr'e <David.Mentre@i...> |
| Subject: | ocamlyacc and error messages |
Hello/Bonjour,
[[ Français (résumé) ]]
Comment donner le numéro de ligne et le point d'échec dans une grammaire
d'un parser généré par ocamlyacc ?
[[ English ]]
What is the simplest way to report an error in a parser generated by
ocamlyacc ?
I would like to report :
1. line number in parsed file
2. failing rule number in grammar
The point (1) is essential for me. Right know, I have a 'Fatal error:
uncaught exception Parsing.Parse_error' not very meaningful. :) I would
prefer have a message like 'parse error on line N in source file,
stucked in grammar rule foo:'.
I've looked at FAQs, mailing-list archive, ocaml sources and ocamlyacc
documentation but did not found very useful info :
. nothing in faqs
. mailing-list : an old message related to caml (not *o*caml)
http://caml.inria.fr/caml-list/0061.html
. ocaml parser in too complicated (rich error handling)
. ocamlyacc doc is minimal
Thanks for any pointer,
david
d.
--
David.Mentre@irisa.fr -- http://www.irisa.fr/prive/dmentre/
Opinions expressed here are only mine.