From: Damien <Damien.Pous@ens-lyon.fr>
Cc: Ocaml Mailing List <caml-list@inria.fr>
Subject: Re: [Caml-list] Ocamllex/Ocamlyacc feature request
Date: Thu, 29 May 2003 14:03:40 +0200 [thread overview]
Message-ID: <20030529140340.035b8586.Damien.Pous@ens-lyon.fr> (raw)
In-Reply-To: <941EB0B0-91BE-11D7-B411-000393B9096C@is.titech.ac.jp>
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
next prev parent reply other threads:[~2003-05-29 12:11 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-05-28 21:03 Brian Hurt
2003-05-29 10:16 ` Ken Wakita
2003-05-29 12:03 ` Damien [this message]
2003-05-29 13:07 ` Luc Maranget
2003-06-04 9:19 ` [Caml-list] Syntax error Lukasz Lew
2003-06-04 17:25 ` Stefan Heimann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20030529140340.035b8586.Damien.Pous@ens-lyon.fr \
--to=damien.pous@ens-lyon.fr \
--cc=caml-list@inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox