Home | History | Annotate | Download | only in doc

Lines Matching full:reduce

269 * Shift/Reduce::      Conflicts: when either shifting or reduction is valid.
273 * Reduce/Reduce:: When two rules are applicable in the same situation.
736 @cindex shift/reduce conflicts
737 @cindex reduce/reduce conflicts
745 input. These are known respectively as @dfn{reduce/reduce} conflicts
746 (@pxref{Reduce/Reduce}), and @dfn{shift/reduce} conflicts
747 (@pxref{Shift/Reduce}).
756 faced with unresolved shift/reduce and reduce/reduce conflicts,
793 @cindex reduce/reduce conflicts
794 @cindex shift/reduce conflicts
932 about one reduce/reduce conflict. In the conflicting situation the
942 to be silent about the one known reduce/reduce conflict, by adding
986 @cindex reduce/reduce conflicts
1050 Bison detects this as a reduce/reduce conflict between the rules
1054 each choice of resolving the reduce/reduce conflict.
1086 have enough information to resolve the reduce/reduce conflict (again,
4912 (@pxref{Shift/Reduce, ,Shift/Reduce Conflicts}), but most real grammars
4913 have harmless shift/reduce conflicts which are resolved in a predictable
4925 be @var{n} shift/reduce conflicts and no reduce/reduce conflicts.
4926 Bison reports an error if the number of shift/reduce conflicts differs
4927 from @var{n}, or if there are any reduce/reduce conflicts.
4929 For deterministic parsers, reduce/reduce conflicts are more
4931 reduce/reduce conflicts for these parsers. With GLR
4934 also possible to specify an expected number of reduce/reduce conflicts
5181 Declare the expected number of shift-reduce conflicts
6424 Unshift a token. This macro is allowed only for rules that reduce
6668 The parser tries, by shifts and reductions, to reduce the entire input down
6676 * Shift/Reduce:: Conflicts: when either shifting or reduction is valid.
6680 * Reduce/Reduce:: When two rules are applicable in the same situation.
6691 The Bison parser does @emph{not} always reduce immediately as soon as the
6735 parser were to reduce before shifting, @w{@samp{1 + 2}} would become an
6748 @node Shift/Reduce
6749 @section Shift/Reduce Conflicts
6751 @cindex shift/reduce conflicts
6778 called a @dfn{shift/reduce conflict}. Bison is designed to resolve
6793 But if the parser chose to reduce when possible rather than shift, the
6807 by choosing to shift rather than reduce. (It would ideally be cleaner to
6812 To avoid warnings from Bison about predictable, legitimate shift/reduce
6814 There will be no warning as long as the number of shift/reduce conflicts
6857 Another situation where shift/reduce conflicts appear is in arithmetic
6860 shift and when to reduce.
6890 should it reduce them via the rule for the subtraction operator? It
6892 must reduce; shifting is invalid because no single rule can reduce the
6900 first in order to permit another opportunity to reduce the difference.
6904 reduce should depend on the relative precedence of the operators
6914 matter of whether the parser chooses to shift or reduce when the stack
6973 precedence is higher, the choice is to reduce. If they have equal
6986 shift/reduce conflicts that do not involve arithmetics-like operators. For
6987 instance, the ``dangling @code{else}'' problem (@pxref{Shift/Reduce, ,
6988 Shift/Reduce Conflicts}) can be solved elegantly in two different ways.
7016 of (e.g., a shift/reduce conflict due to @samp{if test then 1 else 2 + 3}
7092 Then you will see any shift/reduce conflict until you tell Bison how
7117 parser stack. Or it can say, ``Reduce using rule number @var{n}.''
7127 @node Reduce/Reduce
7128 @section Reduce/Reduce Conflicts
7129 @cindex reduce/reduce conflict
7130 @cindex conflicts, reduce/reduce
7132 A reduce/reduce conflict occurs if there are two or more rules that apply
7164 There is also more than one way to reduce nothing-at-all into a
7174 Bison resolves a reduce/reduce conflict by choosing to use the rule that
7176 reduce/reduce conflict must be studied and usually eliminated. Here is the
7188 Here is another common error that yields a reduce/reduce conflict:
7268 shift/reduce conflict, and therefore it can now be addressed with precedence
7320 Sometimes reduce/reduce conflicts can occur that don't look warranted.
7375 mysterious reduce/reduce conflicts. The best way to fix all these problems
7555 significantly reduce the complexity of developing a grammar.
7587 largest lookahead set in each parser state. To reduce the size of the
7824 reduce actions during conflict resolution, some goto actions may become
7839 when to reduce and which reduction to apply
7847 decision at the point it must be made in a shift-reduce parser.
7857 differently in cases where there is a shift-reduce conflict that has not
7859 reduce-reduce conflict. When a GLR parser encounters such a
8339 Bison parsers are @dfn{shift/reduce automata}. In some cases (much more
8380 calc.y: conflicts: 7 shift/reduce
8415 State 8 conflicts: 1 shift/reduce
8416 State 9 conflicts: 1 shift/reduce
8417 State 10 conflicts: 1 shift/reduce
8418 State 11 conflicts: 4 shift/reduce
8525 $default reduce using rule 5 (exp)
8530 (@samp{$default}), the parser will reduce it. If it was coming from
8615 1 shift/reduce}:
8629 '/' [reduce using rule 1 (exp)]
8630 $default reduce using rule 1 (exp)
8643 arbitrarily chose to disable the reduction, see @ref{Shift/Reduce, ,
8644 Shift/Reduce Conflicts}. Discarded actions are reported between
8672 '/' [reduce using rule 1 (exp)]
8673 $default reduce using rule 1 (exp)
8683 Conflict between rule 1 and token '+' resolved as reduce (%left '+').
8684 Conflict between rule 1 and token '-' resolved as reduce (%left '-').
8704 '/' [reduce using rule 2 (exp)]
8705 $default reduce using rule 2 (exp)
8719 '/' [reduce using rule 3 (exp)]
8720 $default reduce using rule 3 (exp)
8737 '+' [reduce using rule 4 (exp)]
8738 '-' [reduce using rule 4 (exp)]
8739 '*' [reduce using rule 4 (exp)]
8740 '/' [reduce using rule 4 (exp)]
8741 $default reduce using rule 4 (exp)
8759 As another means to gain better understanding of the shift/reduce
8851 "." reduce using rule 4 (b)
8852 $default reduce using rule 3 (a)
8857 @center @image{figs/example-reduce, 120pt}
8861 reduction, see @ref{Shift/Reduce, , Shift/Reduce Conflicts}. Discarded actions
11650 time to resolve reduce/reduce conflicts. @xref{GLR Parsers, ,Writing
11707 reduce/reduce conflict with a rule having the same merging function, the
12112 less as well. This can significantly reduce the complexity of developing a