bison-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RFC: variable parse.error


From: Akim Demaille
Subject: RFC: variable parse.error
Date: Tue, 23 Jun 2009 22:22:20 +0200

I am still slowly trying to normalize the name of the variables we will use in Bison 2.6. This patch deprecates %error-verbose in favor of %define parse.error "verbose".

I think "parse.error" is ok, but I'd be happy to receive other proposals. I am less satisfied with "simple" and "verbose". "simple" is ok, but it could be "constant" for instance. Or "yacc" for that matter (actually I don't know if POSIX mandates the format of the error message).

"verbose" is not too good, as it is very vague, and can easily denote many other strategies for error-messages. What will we put if some day we allow the user to hook the generation of error messages (for instance to specify how to display the "unexpected" token)?

I have pushed this as "candidates/parse.error".


From 2a107933f8b56d29e3019a967dd5a5107c7643d0 Mon Sep 17 00:00:00 2001
From: Akim Demaille <address@hidden>
Date: Thu, 18 Jun 2009 10:00:36 +0200
Subject: [PATCH] variables: parse.error

Implement, document, and test the replacement of %error-verbose
by %define parse.error "verbose".

        * data/bison.m4 (b4_error_verbose_if): Reimplement to track the
        values of the parse.error variable.
        Make "simple" its default value.
        Check the valid values.
        * src/parse-gram.y: Use %define parse.error.
        (PERCENT_ERROR_VERBOSE): New token.
        Support it.
        * src/scan-gram.l: Support %error-verbose.

        * src/parse-gram.h, src/parse-gram.c: Regen.

* doc/bison.texinfo (Decl Summary): Replace the documentation of
        %define error-verbose by that of %define parse.error.
        * NEWS: Document it.

        * tests/actions.at, tests/calc.at: Use parse.error instead of
        %error-verbose.

Attachment: 0001-variables-parse.error.txt
Description: Text document



reply via email to

[Prev in Thread] Current Thread [Next in Thread]