Files
bison/tests
Akim Demaille 72c488aa62 diagnostics: improve them for %name-prefix
Currently the diagnostics for %name-prefix are not precise enough.  In
particular, they does not show that braces must be used instead of
quotes.

Before:

    foo.y:3.1-14: warning: deprecated directive, use '%define api.prefix' [-Wdeprecated]
     %name-prefix = "foo"
     ^^^^^^^^^^^^^^

After:

    foo.y:3.1-20: warning: deprecated directive, use '%define api.prefix {foo}' [-Wdeprecated]
     %name-prefix = "foo"
     ^^^^^^^^^^^^^^^^^^^^

To do this we need the value passed to %name-prefix, so move the
warning from the scanner to the parser.

Accuracy will be very important for the forthcoming changes.

* src/parse-gram.y (do_name_prefix): New.
(PERCENT_NAME_PREFIX): Have a semantic value: the raw source, with
possibly underscores, equal sign, and spaces.  This is used to provide
a more accurate message.  It does not take comments into account,
but...
* src/scan-gram.l (%name-prefix): Delegate the warnings to the parser.

* tests/headers.at, tests/input.at: Adjust expectations.
2019-01-14 19:57:37 +01:00
..
2008-11-16 19:46:16 +01:00
2019-01-05 14:58:05 +01:00
2019-01-05 14:58:05 +01:00
2019-01-05 14:58:05 +01:00
2019-01-13 12:26:58 +01:00
2019-01-05 14:58:05 +01:00
2019-01-05 14:58:05 +01:00
2019-01-05 14:58:05 +01:00
2019-01-05 14:58:05 +01:00
2019-01-05 14:58:05 +01:00
2019-01-05 14:58:05 +01:00
2019-01-05 14:58:05 +01:00
2019-01-05 14:58:05 +01:00
2019-01-05 14:58:05 +01:00
2019-01-05 14:58:05 +01:00
2019-01-05 14:58:05 +01:00
2019-01-12 08:19:46 +01:00
2019-01-12 08:19:46 +01:00
2019-01-05 14:58:05 +01:00
2019-01-05 14:58:05 +01:00
2019-01-05 14:58:05 +01:00
2019-01-05 14:58:05 +01:00
2019-01-05 14:58:05 +01:00
2019-01-05 14:58:05 +01:00
2019-01-05 14:58:05 +01:00