mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
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.
This commit is contained in:
@@ -88,7 +88,7 @@ typedef struct
|
|||||||
|
|
||||||
} location;
|
} location;
|
||||||
|
|
||||||
#define YYLTYPE location
|
#define GRAM_LTYPE location
|
||||||
|
|
||||||
#define EMPTY_LOCATION_INIT {{NULL, 0, 0}, {NULL, 0, 0}}
|
#define EMPTY_LOCATION_INIT {{NULL, 0, 0}, {NULL, 0, 0}}
|
||||||
extern location const empty_location;
|
extern location const empty_location;
|
||||||
|
|||||||
@@ -94,14 +94,14 @@ current_lhs(symbol *sym, location loc, named_ref *ref)
|
|||||||
%}
|
%}
|
||||||
|
|
||||||
%debug
|
%debug
|
||||||
%verbose
|
%define api.prefix "gram_"
|
||||||
%defines
|
%define api.pure
|
||||||
%locations
|
|
||||||
%pure-parser
|
|
||||||
%error-verbose
|
|
||||||
%define parse.lac full
|
%define parse.lac full
|
||||||
%name-prefix="gram_"
|
%defines
|
||||||
|
%error-verbose
|
||||||
%expect 0
|
%expect 0
|
||||||
|
%locations
|
||||||
|
%verbose
|
||||||
|
|
||||||
%initial-action
|
%initial-action
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ void gram_scanner_last_string_free (void);
|
|||||||
extern FILE *gram_out;
|
extern FILE *gram_out;
|
||||||
extern int gram_lineno;
|
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;
|
GRAM_LEX_DECL;
|
||||||
|
|
||||||
#endif /* !SCAN_GRAM_H_ */
|
#endif /* !SCAN_GRAM_H_ */
|
||||||
|
|||||||
Reference in New Issue
Block a user