GNU Info

Info Node: (bison.info)Value Type

(bison.info)Value Type


Next: Multiple Types Up: Semantics
Enter node , (file) or (file)node

Data Types of Semantic Values
-----------------------------

   In a simple program it may be sufficient to use the same data type
for the semantic values of all language constructs.  This was true in
the RPN and infix calculator examples (Note: Reverse Polish Notation
Calculator.).

   Bison's default is to use type `int' for all semantic values.  To
specify some other type, define `YYSTYPE' as a macro, like this:

     #define YYSTYPE double

This macro definition must go in the C declarations section of the
grammar file (Note: Outline of a Bison Grammar.).


automatically generated by info2www version 1.2.2.9