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
[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: 2003-05-29 (12:11)
From: Damien <Damien.Pous@e...>
Subject: Re: [Caml-list] Ocamllex/Ocamlyacc feature request

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
>| ... | ...
>| 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 ?


To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: