[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 2/6] parse-gram: update the Bison interface
From: |
Akim Demaille |
Subject: |
[PATCH 2/6] parse-gram: update the Bison interface |
Date: |
Thu, 25 Oct 2012 15:42:40 +0200 |
* 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.
---
src/location.h | 2 +-
src/parse-gram.y | 10 +++++-----
src/scan-gram.h | 2 +-
3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/src/location.h b/src/location.h
index 4c2b410..5ebb92e 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 3120bfc..6a49923 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 ed973c7..72138a2 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_ */
--
1.7.12.2
- [PATCH 0/6] {branch-2.6} Various fixes, Akim Demaille, 2012/10/25
- [PATCH 6/6] tests: address a warning from GCC 4.4, Akim Demaille, 2012/10/25
- [PATCH 1/6] fix comment, Akim Demaille, 2012/10/25
- [PATCH 5/6] tests: don't use options that Clang does not support, Akim Demaille, 2012/10/25
- [PATCH 3/6] regen, Akim Demaille, 2012/10/25
- [PATCH 4/6] tests: restore the tests on -Werror, Akim Demaille, 2012/10/25
- [PATCH 2/6] parse-gram: update the Bison interface,
Akim Demaille <=