DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH
 

(bison) Value Type

Info Catalog (bison) Semantics (bison) Multiple Types
 
 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 ( Reverse Polish Notation
 Calculator RPN Calc.).
 
    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 prologue of the grammar file
 ( Outline of a Bison Grammar Grammar Outline.).
 
Info Catalog (bison) Semantics (bison) Multiple Types
automatically generated byinfo2html