1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270
|
/* before anything */
#ifdef c_plusplus
#ifndef __cplusplus
#define __cplusplus
#endif
#endif
$ /* If we generate a class #define YY_USE_CLASS goes here*/
#ifndef __cplusplus
#ifdef YY_USE_CLASS
#error "This is a C++ header generated by bison++, use a C++ compiler!"
#endif
#else
#ifndef YY_USE_CLASS
/* #warning "For C++ its recomended to use bison++, otherwise classes won't be generated"*/
#endif
#endif
#include <stdio.h>
$ /* %{ and %header{ and %union, during decl */
#ifndef YY_@_COMPATIBILITY
#ifndef YY_USE_CLASS
#define YY_@_COMPATIBILITY 1
#else
#define YY_@_COMPATIBILITY 0
#endif
#endif
#if YY_@_COMPATIBILITY != 0
/* backward compatibility */
#ifdef YYLTYPE
#ifndef YY_@_LTYPE
#define YY_@_LTYPE YYLTYPE
/* WARNING obsolete !!! user defined YYLTYPE not reported into generated header */
/* use %define LTYPE */
#endif
#endif
/*#ifdef YYSTYPE*/
#ifndef YY_@_STYPE
#define YY_@_STYPE YYSTYPE
/* WARNING obsolete !!! user defined YYSTYPE not reported into generated header */
/* use %define STYPE */
#endif
/*#endif*/
#ifdef YYDEBUG
#ifndef YY_@_DEBUG
#define YY_@_DEBUG YYDEBUG
/* WARNING obsolete !!! user defined YYDEBUG not reported into generated header */
/* use %define DEBUG */
#endif
#endif
/* use goto to be compatible */
#ifndef YY_@_USE_GOTO
#define YY_@_USE_GOTO 1
#endif
#endif
/* use no goto to be clean in C++ */
#ifndef YY_@_USE_GOTO
#define YY_@_USE_GOTO 0
#endif
#ifndef YY_@_PURE
$/* YY_@_PURE */
#endif
$/* prefix */
#ifndef YY_@_DEBUG
$/* YY_@_DEBUG */
#endif
#ifndef YY_@_LSP_NEEDED
$ /* YY_@_LSP_NEEDED*/
#endif
/* DEFAULT LTYPE*/
#ifdef YY_@_LSP_NEEDED
#ifndef YY_@_LTYPE
#ifndef BISON_YYLTYPE_ISDECLARED
#define BISON_YYLTYPE_ISDECLARED
typedef
struct yyltype
{
int timestamp;
int first_line;
int first_column;
int last_line;
int last_column;
char *text;
}
yyltype;
#endif
#define YY_@_LTYPE yyltype
#endif
#endif
/* DEFAULT STYPE*/
#ifndef YY_@_STYPE
#define YY_@_STYPE int
#endif
/* DEFAULT MISCELANEOUS */
#ifndef YY_@_PARSE
#define YY_@_PARSE yyparse
#endif
#ifndef YY_@_LEX
#define YY_@_LEX yylex
#endif
#ifndef YY_@_LVAL
#define YY_@_LVAL yylval
#endif
#ifndef YY_@_LLOC
#define YY_@_LLOC yylloc
#endif
#ifndef YY_@_CHAR
#define YY_@_CHAR yychar
#endif
#ifndef YY_@_NERRS
#define YY_@_NERRS yynerrs
#endif
#ifndef YY_@_DEBUG_FLAG
#define YY_@_DEBUG_FLAG yydebug
#endif
#ifndef YY_@_ERROR
#define YY_@_ERROR yyerror
#endif
#ifndef YY_@_PARSE_PARAM
#ifndef __STDC__
#ifndef __cplusplus
#ifndef YY_USE_CLASS
#define YY_@_PARSE_PARAM
#ifndef YY_@_PARSE_PARAM_DEF
#define YY_@_PARSE_PARAM_DEF
#endif
#endif
#endif
#endif
#ifndef YY_@_PARSE_PARAM
#define YY_@_PARSE_PARAM void
#endif
#endif
/* TOKEN C */
#ifndef YY_USE_CLASS
#ifndef YY_@_PURE
#ifndef yylval
extern YY_@_STYPE YY_@_LVAL;
#else
#if yylval != YY_@_LVAL
extern YY_@_STYPE YY_@_LVAL;
#else
#warning "Namespace conflict, disabling some functionality (bison++ only)"
#endif
#endif
#endif
$ /* #defines token */
/* after #define tokens, before const tokens S5*/
#else
#ifndef YY_@_CLASS
#define YY_@_CLASS @
#endif
#ifndef YY_@_INHERIT
#define YY_@_INHERIT
#endif
#ifndef YY_@_MEMBERS
#define YY_@_MEMBERS
#endif
#ifndef YY_@_LEX_BODY
#define YY_@_LEX_BODY
#endif
#ifndef YY_@_ERROR_BODY
#define YY_@_ERROR_BODY
#endif
#ifndef YY_@_CONSTRUCTOR_PARAM
#define YY_@_CONSTRUCTOR_PARAM
#endif
/* choose between enum and const */
#ifndef YY_@_USE_CONST_TOKEN
#define YY_@_USE_CONST_TOKEN 0
/* yes enum is more compatible with flex, */
/* so by default we use it */
#endif
#if YY_@_USE_CONST_TOKEN != 0
#ifndef YY_@_ENUM_TOKEN
#define YY_@_ENUM_TOKEN yy_@_enum_token
#endif
#endif
class YY_@_CLASS YY_@_INHERIT
{
public:
#if YY_@_USE_CONST_TOKEN != 0
/* static const int token ... */
$ /* decl const */
#else
enum YY_@_ENUM_TOKEN { YY_@_NULL_TOKEN=0
$ /* enum token */
}; /* end of enum declaration */
#endif
public:
int YY_@_PARSE(YY_@_PARSE_PARAM);
virtual void YY_@_ERROR(char *msg) YY_@_ERROR_BODY;
#ifdef YY_@_PURE
#ifdef YY_@_LSP_NEEDED
virtual int YY_@_LEX(YY_@_STYPE *YY_@_LVAL,YY_@_LTYPE *YY_@_LLOC) YY_@_LEX_BODY;
#else
virtual int YY_@_LEX(YY_@_STYPE *YY_@_LVAL) YY_@_LEX_BODY;
#endif
#else
virtual int YY_@_LEX() YY_@_LEX_BODY;
YY_@_STYPE YY_@_LVAL;
#ifdef YY_@_LSP_NEEDED
YY_@_LTYPE YY_@_LLOC;
#endif
int YY_@_NERRS;
int YY_@_CHAR;
#endif
#if YY_@_DEBUG != 0
public:
int YY_@_DEBUG_FLAG; /* nonzero means print parse trace */
#endif
public:
YY_@_CLASS(YY_@_CONSTRUCTOR_PARAM);
public:
YY_@_MEMBERS
};
/* other declare folow */
#endif
#if YY_@_COMPATIBILITY != 0
/* backward compatibility */
/* Removed due to bison problems
/#ifndef YYSTYPE
/ #define YYSTYPE YY_@_STYPE
/#endif*/
#ifndef YYLTYPE
#define YYLTYPE YY_@_LTYPE
#endif
#ifndef YYDEBUG
#ifdef YY_@_DEBUG
#define YYDEBUG YY_@_DEBUG
#endif
#endif
#endif
/* END */
$ /* section 3 %header{ */
/* AFTER END , NEVER READ !!! */
|