Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] Ocamllex/Ocamlyacc feature request
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Damien <Damien.Pous@e...>
Subject: Re: [Caml-list] Ocamllex/Ocamlyacc feature request
Hello,

OCAMLRUNPARAM seems pretty fine for debugging purposes, 
what about "end-user error reporting" :

could the special terminal 'error' have some useful parameters ?

>type token_error_t = {
>chars: int*int;
>lexeme: string;
>token: token;
>expected: token list;
>}
>"%token <token_error_t> error"
would allow
>toto:
>| ... | ...
>| error { failwith (arf $1) }
>;

then, is there a "nice method" to insert error terminals in a
grammar, in order to get a parser :
	- without s/r or r/r conflicts
	- that never raise "Parsing.parse_error" : all error cases are
	identified and raise "My_informative_parse_error"
?

till now, I've always used the "try until no conflict" method, which
isn't really "nice"

could ocamlyacc decide whether a grammar is "exhaustive", like ocaml
does for pattern-matching ?


thanks,
damien

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners