projects
/
bison.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
style: indentation fixes
[bison.git]
/
src
/
parse-gram.y
diff --git
a/src/parse-gram.y
b/src/parse-gram.y
index f0187fb308a7e7f076a703766c132e7dbad61df0..8a2a04ea32e2e27551caf7c384b299f6f459736d 100644
(file)
--- a/
src/parse-gram.y
+++ b/
src/parse-gram.y
@@
-1,6
+1,6
@@
%{/* Bison Grammar Parser -*- C -*-
%{/* Bison Grammar Parser -*- C -*-
- Copyright (C) 2002-201
2
Free Software Foundation, Inc.
+ Copyright (C) 2002-201
3
Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
This file is part of Bison, the GNU Compiler Compiler.
@@
-87,15
+87,15
@@
static char const *char_name (char);
#define YYTYPE_UINT8 uint_fast8_t
}
#define YYTYPE_UINT8 uint_fast8_t
}
-%verbose
-%defines
-%define locations
+%define api.prefix "gram_"
%define api.pure
%define api.pure
+%define locations
%define parse.error verbose
%define parse.lac full
%define parse.trace
%define parse.error verbose
%define parse.lac full
%define parse.trace
-%
name-prefix "gram_"
+%
defines
%expect 0
%expect 0
+%verbose
%initial-action
{
%initial-action
{
@@
-317,7
+317,6
@@
prologue_declaration:
| "%expect" INT { expected_sr_conflicts = $2; }
| "%expect-rr" INT { expected_rr_conflicts = $2; }
| "%file-prefix" STRING { spec_file_prefix = $2; }
| "%expect" INT { expected_sr_conflicts = $2; }
| "%expect-rr" INT { expected_rr_conflicts = $2; }
| "%file-prefix" STRING { spec_file_prefix = $2; }
-| "%file-prefix" "=" STRING { spec_file_prefix = $3; } /* deprecated */
| "%glr-parser"
{
nondeterministic_parser = true;
| "%glr-parser"
{
nondeterministic_parser = true;
@@
-334,11
+333,9
@@
prologue_declaration:
}
| "%language" STRING { language_argmatch ($2, grammar_prio, @1); }
| "%name-prefix" STRING { spec_name_prefix = $2; }
}
| "%language" STRING { language_argmatch ($2, grammar_prio, @1); }
| "%name-prefix" STRING { spec_name_prefix = $2; }
-| "%name-prefix" "=" STRING { spec_name_prefix = $3; } /* deprecated */
| "%no-lines" { no_lines_flag = true; }
| "%nondeterministic-parser" { nondeterministic_parser = true; }
| "%output" STRING { spec_outfile = $2; }
| "%no-lines" { no_lines_flag = true; }
| "%nondeterministic-parser" { nondeterministic_parser = true; }
| "%output" STRING { spec_outfile = $2; }
-| "%output" "=" STRING { spec_outfile = $3; } /* deprecated */
| "%param" { current_param = $1; } params { current_param = param_none; }
| "%require" STRING { version_check (&@2, $2); }
| "%skeleton" STRING
| "%param" { current_param = $1; } params { current_param = param_none; }
| "%require" STRING { version_check (&@2, $2); }
| "%skeleton" STRING
@@
-506,7
+503,7
@@
symbols.prec:
symbol.prec
{ $$ = symbol_list_sym_new ($1, @1); }
| symbols.prec symbol.prec
symbol.prec
{ $$ = symbol_list_sym_new ($1, @1); }
| symbols.prec symbol.prec
- { $$ = symbol_list_
pre
pend ($1, symbol_list_sym_new ($2, @2)); }
+ { $$ = symbol_list_
ap
pend ($1, symbol_list_sym_new ($2, @2)); }
;
symbol.prec:
;
symbol.prec:
@@
-519,12
+516,12
@@
symbols.1:
symbol
{ $$ = symbol_list_sym_new ($1, @1); }
| symbols.1 symbol
symbol
{ $$ = symbol_list_sym_new ($1, @1); }
| symbols.1 symbol
- { $$ = symbol_list_
pre
pend ($1, symbol_list_sym_new ($2, @2)); }
+ { $$ = symbol_list_
ap
pend ($1, symbol_list_sym_new ($2, @2)); }
;
generic_symlist:
generic_symlist_item { $$ = $1; }
;
generic_symlist:
generic_symlist_item { $$ = $1; }
-| generic_symlist generic_symlist_item { $$ = symbol_list_
pre
pend ($1, $2); }
+| generic_symlist generic_symlist_item { $$ = symbol_list_
ap
pend ($1, $2); }
;
generic_symlist_item:
;
generic_symlist_item:
@@
-541,15
+538,15
@@
tag:
/* One token definition. */
symbol_def:
TAG
/* One token definition. */
symbol_def:
TAG
-
{
-
current_type = $1;
-
tag_seen = true;
-
}
+ {
+ current_type = $1;
+ tag_seen = true;
+ }
| id
| id
-
{
-
symbol_class_set ($1, current_class, @1, true);
-
symbol_type_set ($1, current_type, @1);
-
}
+ {
+ symbol_class_set ($1, current_class, @1, true);
+ symbol_type_set ($1, current_type, @1);
+ }
| id INT
{
symbol_class_set ($1, current_class, @1, true);
| id INT
{
symbol_class_set ($1, current_class, @1, true);
@@
-724,7
+721,6
@@
epilogue.opt:
%%
%%
-
/* Return the location of the left-hand side of a rule whose
right-hand side is RHS[1] ... RHS[N]. Ignore empty nonterminals in
the right-hand side, and return an empty location equal to the end
/* Return the location of the left-hand side of a rule whose
right-hand side is RHS[1] ... RHS[N]. Ignore empty nonterminals in
the right-hand side, and return an empty location equal to the end