
Syntax Analyzer 121
The data type of yylval, yyval and the value-stack, by default, is integer, but it can be set
to any other type by, for example,
#define YYSTYPE double
This will allow use of double, i.e. double-precision floating-point numbers.
4.4.6 Ambiguity and Conflict Resolution
A grammar may have ambiguous rules such that it can do two legal operations, a shift or a reduction
and has no way of deciding between them. This is called Shift/Reduce conflict. It is also possible that
the parser has a choice of two possible and legal reductions. This is called a Reduce/Reduce conflict.
YACC uses two disambiguating rules whenever faced with ...