Win7
cygwin cygcheck (cygwin) 1.7.25

bison (GNU Bison) 2.7.1

The typedef for YYSTYPE is not created in the parser output file (in my case) 
Slip.bison.cpp nor in any file imported by flex. Is there any reason, e.g., am 
I doing something wrong or not using a bison option correctly?

The indication seems to be that if I use %union then YYSTYPE is not defined. Is 
my reading accurate?

The input from the grammar definition file (Slip.y) is:


 %file-prefix "Slip.bison"
 %language "C++"
 %name-prefix "Slip"
 %output "Slip.Bison.cpp"
 
 %union {
   int   everything;
 }


The generated parser fragment (without #lines) is:


namespace Slip {

  /// A Bison parser.
  class parser
  {
  public:
    /// Symbol semantic values.
#ifndef YYSTYPE
    union semantic_type
    {

   int   everything;
    };
#else
    typedef YYSTYPE semantic_type;
#endif

_______________________________________________
help-bison@gnu.org https://lists.gnu.org/mailman/listinfo/help-bison

Reply via email to