From: Akim Demaille Date: Thu, 25 Oct 2012 07:34:00 +0000 (+0200) Subject: parse-gram: update the Bison interface X-Git-Tag: v2.6.5~36 X-Git-Url: https://git.saurik.com/bison.git/commitdiff_plain/e73ac5a09b54ad2c1e4169d7a5e309f7cf32633f?ds=inline parse-gram: update the Bison interface * src/parse-gram.y (%pure-parser, %name-prefix): Replace with... (%define api.pure, %define api.prefix) * src/location.h, src/scan-gram.h: Adjust to api.prefix. --- diff --git a/src/location.h b/src/location.h index 4c2b410d..5ebb92e3 100644 --- a/src/location.h +++ b/src/location.h @@ -88,7 +88,7 @@ typedef struct } location; -#define YYLTYPE location +#define GRAM_LTYPE location #define EMPTY_LOCATION_INIT {{NULL, 0, 0}, {NULL, 0, 0}} extern location const empty_location; diff --git a/src/parse-gram.y b/src/parse-gram.y index 3120bfc2..6a49923c 100644 --- a/src/parse-gram.y +++ b/src/parse-gram.y @@ -94,14 +94,14 @@ current_lhs(symbol *sym, location loc, named_ref *ref) %} %debug -%verbose +%define api.prefix "gram_" +%define api.pure +%define parse.lac full %defines -%locations -%pure-parser %error-verbose -%define parse.lac full -%name-prefix="gram_" %expect 0 +%locations +%verbose %initial-action { diff --git a/src/scan-gram.h b/src/scan-gram.h index ed973c78..72138a27 100644 --- a/src/scan-gram.h +++ b/src/scan-gram.h @@ -32,7 +32,7 @@ void gram_scanner_last_string_free (void); extern FILE *gram_out; extern int gram_lineno; -# define GRAM_LEX_DECL int gram_lex (YYSTYPE *val, location *loc) +# define GRAM_LEX_DECL int gram_lex (GRAM_STYPE *val, location *loc) GRAM_LEX_DECL; #endif /* !SCAN_GRAM_H_ */