X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/98a345a21936699f675d53a90e0b93bdb5e18e37..b987342bab23bb8c12b15cfbbda73aa6ff09f238:/NEWS diff --git a/NEWS b/NEWS index fe80c6ff..76d8f4b2 100644 --- a/NEWS +++ b/NEWS @@ -9,6 +9,22 @@ Bison News Also, it is possible to add code to the parser's constructors using "%code init" and "%define init_throws". +** Variable api.tokens.prefix + + The variable api.tokens.prefix changes the way tokens are identified in + the generated files. This is especially useful to avoid collisions + with identifiers in the target language. For instance + + %token FILE for ERROR + %define api.tokens.prefix "TOK_" + %% + start: FILE for ERROR; + + will generate the definition of the symbols TOK_FILE, TOK_for, and + TOK_ERROR in the generated sources. In particular, the scanner must + use these prefixed token names, although the grammar itself still + uses the short names (as in the sample rule given above). + * Changes in version 2.5 (????-??-??): ** IELR(1) and Canonical LR(1) Support @@ -70,6 +86,14 @@ Bison News The old names are now deprecated but will be maintained indefinitely for backward compatibility. +** Symbols names + + Consistently with directives (such as %error-verbose) and variables + (e.g. push-pull), symbol names may include dashes in any position, + similarly to periods and underscores. This is GNU extension over + POSIX Yacc whose use is reported by -Wyacc, and rejected in Yacc + mode (--yacc). + ** Temporary hack for adding a semicolon to the user action. Previously, Bison appended a semicolon to every user action for