ce_parse.cpp File Reference

#include "cppvalue.h"
#include "constexp.h"
#include "message.h"
#include <stdio.h>
#include <stdlib.h>

Go to the source code of this file.

Classes

union  yyalloc

Defines

#define YYBISON   1
#define YYBISON_VERSION   "2.3"
#define YYSKELETON_NAME   "yacc.c"
#define YYPURE   0
#define YYLSP_NEEDED   0
#define yyparse   cppExpYYparse
#define yylex   cppExpYYlex
#define yyerror   cppExpYYerror
#define yylval   cppExpYYlval
#define yychar   cppExpYYchar
#define yydebug   cppExpYYdebug
#define yynerrs   cppExpYYnerrs
#define TOK_QUESTIONMARK   258
#define TOK_COLON   259
#define TOK_OR   260
#define TOK_AND   261
#define TOK_BITWISEOR   262
#define TOK_BITWISEXOR   263
#define TOK_AMPERSAND   264
#define TOK_NOTEQUAL   265
#define TOK_EQUAL   266
#define TOK_LESSTHAN   267
#define TOK_GREATERTHAN   268
#define TOK_LESSTHANOREQUALTO   269
#define TOK_GREATERTHANOREQUALTO   270
#define TOK_SHIFTLEFT   271
#define TOK_SHIFTRIGHT   272
#define TOK_PLUS   273
#define TOK_MINUS   274
#define TOK_STAR   275
#define TOK_DIVIDE   276
#define TOK_MOD   277
#define TOK_TILDE   278
#define TOK_NOT   279
#define TOK_LPAREN   280
#define TOK_RPAREN   281
#define TOK_OCTALINT   282
#define TOK_DECIMALINT   283
#define TOK_HEXADECIMALINT   284
#define TOK_CHARACTER   285
#define TOK_FLOAT   286
#define YYSTYPE   CPPValue
#define YYDEBUG   0
#define YYERROR_VERBOSE   0
#define YYTOKEN_TABLE   0
#define YYSIZE_T   unsigned int
#define YYSIZE_MAXIMUM   ((YYSIZE_T) -1)
#define YY_(msgid)   msgid
#define YYUSE(e)   ((void) (e))
#define YYID(n)   (n)
#define YYSTACK_ALLOC   YYMALLOC
#define YYSTACK_FREE   YYFREE
#define YYSTACK_ALLOC_MAXIMUM   YYSIZE_MAXIMUM
#define YYMALLOC   malloc
#define YYFREE   free
#define YYSTACK_GAP_MAXIMUM   (sizeof (union yyalloc) - 1)
#define YYSTACK_BYTES(N)
#define YYCOPY(To, From, Count)
#define YYSTACK_RELOCATE(Stack)
#define YYFINAL   31
#define YYLAST   63
#define YYNTOKENS   32
#define YYNNTS   16
#define YYNRULES   44
#define YYNSTATES   73
#define YYUNDEFTOK   2
#define YYMAXUTOK   286
#define YYTRANSLATE(YYX)   ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
#define YYPACT_NINF   -29
#define YYTABLE_NINF   -1
#define yyerrok   (yyerrstatus = 0)
#define yyclearin   (yychar = YYEMPTY)
#define YYEMPTY   (-2)
#define YYEOF   0
#define YYACCEPT   goto yyacceptlab
#define YYABORT   goto yyabortlab
#define YYERROR   goto yyerrorlab
#define YYFAIL   goto yyerrlab
#define YYRECOVERING()   (!!yyerrstatus)
#define YYBACKUP(Token, Value)
#define YYTERROR   1
#define YYERRCODE   256
#define YYRHSLOC(Rhs, K)   ((Rhs)[K])
#define YYLLOC_DEFAULT(Current, Rhs, N)
#define YY_LOCATION_PRINT(File, Loc)   ((void) 0)
#define YYLEX   yylex ()
#define YYDPRINTF(Args)
#define YY_SYMBOL_PRINT(Title, Type, Value, Location)
#define YY_STACK_PRINT(Bottom, Top)
#define YY_REDUCE_PRINT(Rule)
#define YYINITDEPTH   200
#define YYMAXDEPTH   10000
#define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N))

Typedefs

typedef unsigned char yytype_uint8
typedef short int yytype_int8
typedef unsigned short int yytype_uint16
typedef short int yytype_int16

Enumerations

enum  yytokentype {
  TOK_QUESTIONMARK = 258, TOK_COLON = 259, TOK_OR = 260, TOK_AND = 261,
  TOK_BITWISEOR = 262, TOK_BITWISEXOR = 263, TOK_AMPERSAND = 264, TOK_NOTEQUAL = 265,
  TOK_EQUAL = 266, TOK_LESSTHAN = 267, TOK_GREATERTHAN = 268, TOK_LESSTHANOREQUALTO = 269,
  TOK_GREATERTHANOREQUALTO = 270, TOK_SHIFTLEFT = 271, TOK_SHIFTRIGHT = 272, TOK_PLUS = 273,
  TOK_MINUS = 274, TOK_STAR = 275, TOK_DIVIDE = 276, TOK_MOD = 277,
  TOK_TILDE = 278, TOK_NOT = 279, TOK_LPAREN = 280, TOK_RPAREN = 281,
  TOK_OCTALINT = 282, TOK_DECIMALINT = 283, TOK_HEXADECIMALINT = 284, TOK_CHARACTER = 285,
  TOK_FLOAT = 286, TOK_QUESTIONMARK = 258, TOK_COLON = 259, TOK_OR = 260,
  TOK_AND = 261, TOK_BITWISEOR = 262, TOK_BITWISEXOR = 263, TOK_AMPERSAND = 264,
  TOK_NOTEQUAL = 265, TOK_EQUAL = 266, TOK_LESSTHAN = 267, TOK_GREATERTHAN = 268,
  TOK_LESSTHANOREQUALTO = 269, TOK_GREATERTHANOREQUALTO = 270, TOK_SHIFTLEFT = 271, TOK_SHIFTRIGHT = 272,
  TOK_PLUS = 273, TOK_MINUS = 274, TOK_STAR = 275, TOK_DIVIDE = 276,
  TOK_MOD = 277, TOK_TILDE = 278, TOK_NOT = 279, TOK_LPAREN = 280,
  TOK_RPAREN = 281, TOK_OCTALINT = 282, TOK_DECIMALINT = 283, TOK_HEXADECIMALINT = 284,
  TOK_CHARACTER = 285, TOK_FLOAT = 286
}

Functions

int cppExpYYerror (const char *s)
int cppExpYYlex ()
int yyparse ()

Variables

int yytype
YYSTYPEyyvaluep
int yychar
YYSTYPE yylval
int yynerrs


Define Documentation

#define TOK_AMPERSAND   264

Definition at line 115 of file ce_parse.cpp.

#define TOK_AND   261

Definition at line 112 of file ce_parse.cpp.

#define TOK_BITWISEOR   262

Definition at line 113 of file ce_parse.cpp.

#define TOK_BITWISEXOR   263

Definition at line 114 of file ce_parse.cpp.

#define TOK_CHARACTER   285

Definition at line 136 of file ce_parse.cpp.

#define TOK_COLON   259

Definition at line 110 of file ce_parse.cpp.

#define TOK_DECIMALINT   283

Definition at line 134 of file ce_parse.cpp.

#define TOK_DIVIDE   276

Definition at line 127 of file ce_parse.cpp.

#define TOK_EQUAL   266

Definition at line 117 of file ce_parse.cpp.

#define TOK_FLOAT   286

Definition at line 137 of file ce_parse.cpp.

#define TOK_GREATERTHAN   268

Definition at line 119 of file ce_parse.cpp.

#define TOK_GREATERTHANOREQUALTO   270

Definition at line 121 of file ce_parse.cpp.

#define TOK_HEXADECIMALINT   284

Definition at line 135 of file ce_parse.cpp.

#define TOK_LESSTHAN   267

Definition at line 118 of file ce_parse.cpp.

#define TOK_LESSTHANOREQUALTO   269

Definition at line 120 of file ce_parse.cpp.

#define TOK_LPAREN   280

Definition at line 131 of file ce_parse.cpp.

#define TOK_MINUS   274

Definition at line 125 of file ce_parse.cpp.

#define TOK_MOD   277

Definition at line 128 of file ce_parse.cpp.

#define TOK_NOT   279

Definition at line 130 of file ce_parse.cpp.

#define TOK_NOTEQUAL   265

Definition at line 116 of file ce_parse.cpp.

#define TOK_OCTALINT   282

Definition at line 133 of file ce_parse.cpp.

#define TOK_OR   260

Definition at line 111 of file ce_parse.cpp.

#define TOK_PLUS   273

Definition at line 124 of file ce_parse.cpp.

#define TOK_QUESTIONMARK   258

Definition at line 109 of file ce_parse.cpp.

#define TOK_RPAREN   281

Definition at line 132 of file ce_parse.cpp.

#define TOK_SHIFTLEFT   271

Definition at line 122 of file ce_parse.cpp.

#define TOK_SHIFTRIGHT   272

Definition at line 123 of file ce_parse.cpp.

#define TOK_STAR   275

Definition at line 126 of file ce_parse.cpp.

#define TOK_TILDE   278

Definition at line 129 of file ce_parse.cpp.

#define YY_ ( msgid   )     msgid

Definition at line 258 of file ce_parse.cpp.

Referenced by yyparse().

#define YY_LOCATION_PRINT ( File,
Loc   )     ((void) 0)

Definition at line 725 of file ce_parse.cpp.

#define YY_REDUCE_PRINT ( Rule   ) 

Definition at line 895 of file ce_parse.cpp.

Referenced by yyparse().

#define YY_STACK_PRINT ( Bottom,
Top   ) 

Definition at line 894 of file ce_parse.cpp.

Referenced by yyparse().

#define YY_SYMBOL_PRINT ( Title,
Type,
Value,
Location   ) 

Definition at line 893 of file ce_parse.cpp.

Referenced by yyparse().

#define YYABORT   goto yyabortlab

Definition at line 654 of file ce_parse.cpp.

Referenced by yyparse().

#define YYACCEPT   goto yyacceptlab

Definition at line 653 of file ce_parse.cpp.

Referenced by yyparse().

#define YYBACKUP ( Token,
Value   ) 

Value:

do                                                              \
  if (yychar == YYEMPTY && yylen == 1)                          \
    {                                                           \
      yychar = (Token);                                         \
      yylval = (Value);                                         \
      yytoken = YYTRANSLATE (yychar);                           \
      YYPOPSTACK (1);                                           \
      goto yybackup;                                            \
    }                                                           \
  else                                                          \
    {                                                           \
      yyerror (YY_("syntax error: cannot back up")); \
      YYERROR;                                                  \
    }                                                           \
while (YYID (0))

Definition at line 666 of file ce_parse.cpp.

#define YYBISON   1

Definition at line 47 of file ce_parse.cpp.

#define YYBISON_VERSION   "2.3"

Definition at line 50 of file ce_parse.cpp.

#define yychar   cppExpYYchar

Definition at line 66 of file ce_parse.cpp.

#define yyclearin   (yychar = YYEMPTY)

Definition at line 649 of file ce_parse.cpp.

#define YYCOPY ( To,
From,
Count   ) 

Value:

do                                      \
        {                                       \
          YYSIZE_T yyi;                         \
          for (yyi = 0; yyi < (Count); yyi++)   \
            (To)[yyi] = (From)[yyi];            \
        }                                       \
      while (YYID (0))

Definition at line 384 of file ce_parse.cpp.

#define YYDEBUG   0

Definition at line 172 of file ce_parse.cpp.

#define yydebug   cppExpYYdebug

Definition at line 67 of file ce_parse.cpp.

#define YYDPRINTF ( Args   ) 

Definition at line 892 of file ce_parse.cpp.

Referenced by yyparse().

#define YYEMPTY   (-2)

Definition at line 650 of file ce_parse.cpp.

Referenced by yyparse().

#define YYEOF   0

Definition at line 651 of file ce_parse.cpp.

Referenced by yyparse().

#define YYERRCODE   256

Definition at line 685 of file ce_parse.cpp.

#define yyerrok   (yyerrstatus = 0)

Definition at line 648 of file ce_parse.cpp.

#define YYERROR   goto yyerrorlab

Definition at line 655 of file ce_parse.cpp.

#define yyerror   cppExpYYerror

Definition at line 64 of file ce_parse.cpp.

Referenced by yyparse().

#define YYERROR_VERBOSE   0

Definition at line 180 of file ce_parse.cpp.

#define YYFAIL   goto yyerrlab

Definition at line 662 of file ce_parse.cpp.

#define YYFINAL   31

Definition at line 414 of file ce_parse.cpp.

Referenced by yyparse().

#define YYFREE   free

Definition at line 347 of file ce_parse.cpp.

#define YYID (  )     (n)

Definition at line 271 of file ce_parse.cpp.

Referenced by yyparse().

#define YYINITDEPTH   200

Definition at line 901 of file ce_parse.cpp.

Referenced by yyparse().

#define YYLAST   63

Definition at line 416 of file ce_parse.cpp.

Referenced by yyparse().

#define YYLEX   yylex ()

Definition at line 735 of file ce_parse.cpp.

Referenced by yyparse().

#define yylex   cppExpYYlex

Definition at line 63 of file ce_parse.cpp.

#define YYLLOC_DEFAULT ( Current,
Rhs,
 ) 

Value:

do                                                                      \
      if (YYID (N))                                                    \
        {                                                               \
          (Current).first_line   = YYRHSLOC (Rhs, 1).first_line;        \
          (Current).first_column = YYRHSLOC (Rhs, 1).first_column;      \
          (Current).last_line    = YYRHSLOC (Rhs, N).last_line;         \
          (Current).last_column  = YYRHSLOC (Rhs, N).last_column;       \
        }                                                               \
      else                                                              \
        {                                                               \
          (Current).first_line   = (Current).last_line   =              \
            YYRHSLOC (Rhs, 0).last_line;                                \
          (Current).first_column = (Current).last_column =              \
            YYRHSLOC (Rhs, 0).last_column;                              \
        }                                                               \
    while (YYID (0))

Definition at line 694 of file ce_parse.cpp.

#define YYLSP_NEEDED   0

Definition at line 59 of file ce_parse.cpp.

#define yylval   cppExpYYlval

Definition at line 65 of file ce_parse.cpp.

#define YYMALLOC   malloc

Definition at line 340 of file ce_parse.cpp.

#define YYMAXDEPTH   10000

Definition at line 912 of file ce_parse.cpp.

Referenced by yyparse().

#define YYMAXUTOK   286

Definition at line 429 of file ce_parse.cpp.

#define yynerrs   cppExpYYnerrs

Definition at line 68 of file ce_parse.cpp.

#define YYNNTS   16

Definition at line 421 of file ce_parse.cpp.

#define YYNRULES   44

Definition at line 423 of file ce_parse.cpp.

#define YYNSTATES   73

Definition at line 425 of file ce_parse.cpp.

#define YYNTOKENS   32

Definition at line 419 of file ce_parse.cpp.

Referenced by yyparse().

#define YYPACT_NINF   -29

Definition at line 587 of file ce_parse.cpp.

Referenced by yyparse().

#define yyparse   cppExpYYparse

Definition at line 62 of file ce_parse.cpp.

#define YYPOPSTACK (  )     (yyvsp -= (N), yyssp -= (N))

Referenced by yyparse().

#define YYPURE   0

Definition at line 56 of file ce_parse.cpp.

 
#define YYRECOVERING (  )     (!!yyerrstatus)

Definition at line 664 of file ce_parse.cpp.

#define YYRHSLOC ( Rhs,
 )     ((Rhs)[K])

Definition at line 692 of file ce_parse.cpp.

#define YYSIZE_MAXIMUM   ((YYSIZE_T) -1)

Definition at line 248 of file ce_parse.cpp.

#define YYSIZE_T   unsigned int

Definition at line 244 of file ce_parse.cpp.

Referenced by yyparse().

#define YYSKELETON_NAME   "yacc.c"

Definition at line 53 of file ce_parse.cpp.

#define YYSTACK_ALLOC   YYMALLOC

Definition at line 326 of file ce_parse.cpp.

Referenced by yyparse().

#define YYSTACK_ALLOC_MAXIMUM   YYSIZE_MAXIMUM

Definition at line 329 of file ce_parse.cpp.

Referenced by yyparse().

#define YYSTACK_BYTES (  ) 

Value:

((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
      + YYSTACK_GAP_MAXIMUM)

Definition at line 373 of file ce_parse.cpp.

Referenced by yyparse().

#define YYSTACK_FREE   YYFREE

Definition at line 327 of file ce_parse.cpp.

Referenced by yyparse().

#define YYSTACK_GAP_MAXIMUM   (sizeof (union yyalloc) - 1)

Definition at line 369 of file ce_parse.cpp.

#define YYSTACK_RELOCATE ( Stack   ) 

Value:

do                                                                      \
      {                                                                 \
        YYSIZE_T yynewbytes;                                            \
        YYCOPY (&yyptr->Stack, Stack, yysize);                          \
        Stack = &yyptr->Stack;                                          \
        yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
        yyptr += yynewbytes / sizeof (*yyptr);                          \
      }                                                                 \
    while (YYID (0))

Definition at line 400 of file ce_parse.cpp.

Referenced by yyparse().

#define YYSTYPE   CPPValue

Definition at line 154 of file ce_parse.cpp.

Referenced by yyparse().

#define YYTABLE_NINF   -1

Definition at line 611 of file ce_parse.cpp.

Referenced by yyparse().

#define YYTERROR   1

Definition at line 684 of file ce_parse.cpp.

Referenced by yyparse().

#define YYTOKEN_TABLE   0

Definition at line 185 of file ce_parse.cpp.

#define YYTRANSLATE ( YYX   )     ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)

Definition at line 431 of file ce_parse.cpp.

Referenced by yyparse().

#define YYUNDEFTOK   2

Definition at line 428 of file ce_parse.cpp.

#define YYUSE (  )     ((void) (e))

Definition at line 264 of file ce_parse.cpp.


Typedef Documentation

typedef short int yytype_int16

Definition at line 231 of file ce_parse.cpp.

typedef short int yytype_int8

Definition at line 219 of file ce_parse.cpp.

typedef unsigned short int yytype_uint16

Definition at line 225 of file ce_parse.cpp.

typedef unsigned char yytype_uint8

Definition at line 210 of file ce_parse.cpp.


Enumeration Type Documentation

enum yytokentype

Enumerator:
TOK_QUESTIONMARK 
TOK_COLON 
TOK_OR 
TOK_AND 
TOK_BITWISEOR 
TOK_BITWISEXOR 
TOK_AMPERSAND 
TOK_NOTEQUAL 
TOK_EQUAL 
TOK_LESSTHAN 
TOK_GREATERTHAN 
TOK_LESSTHANOREQUALTO 
TOK_GREATERTHANOREQUALTO 
TOK_SHIFTLEFT 
TOK_SHIFTRIGHT 
TOK_PLUS 
TOK_MINUS 
TOK_STAR 
TOK_DIVIDE 
TOK_MOD 
TOK_TILDE 
TOK_NOT 
TOK_LPAREN 
TOK_RPAREN 
TOK_OCTALINT 
TOK_DECIMALINT 
TOK_HEXADECIMALINT 
TOK_CHARACTER 
TOK_FLOAT 
TOK_QUESTIONMARK 
TOK_COLON 
TOK_OR 
TOK_AND 
TOK_BITWISEOR 
TOK_BITWISEXOR 
TOK_AMPERSAND 
TOK_NOTEQUAL 
TOK_EQUAL 
TOK_LESSTHAN 
TOK_GREATERTHAN 
TOK_LESSTHANOREQUALTO 
TOK_GREATERTHANOREQUALTO 
TOK_SHIFTLEFT 
TOK_SHIFTRIGHT 
TOK_PLUS 
TOK_MINUS 
TOK_STAR 
TOK_DIVIDE 
TOK_MOD 
TOK_TILDE 
TOK_NOT 
TOK_LPAREN 
TOK_RPAREN 
TOK_OCTALINT 
TOK_DECIMALINT 
TOK_HEXADECIMALINT 
TOK_CHARACTER 
TOK_FLOAT 

Definition at line 76 of file ce_parse.cpp.


Function Documentation

int cppExpYYerror ( const char *  s  ) 

Definition at line 159 of file ce_parse.cpp.

References g_constExpFileName, g_constExpLineNr, and warn().

int cppExpYYlex (  ) 

int yyparse (  ) 

Definition at line 1210 of file ce_parse.cpp.

References g_resultValue, parseCharacter(), parseDecimal(), parseFloat(), parseHexadecimal(), parseOctal(), YY_, YY_REDUCE_PRINT, YY_STACK_PRINT, YY_SYMBOL_PRINT, YYABORT, YYACCEPT, YYDPRINTF, YYEMPTY, YYEOF, yyerror, YYFINAL, YYID, YYINITDEPTH, YYLAST, YYLEX, YYMAXDEPTH, YYNTOKENS, YYPACT_NINF, YYPOPSTACK, YYSIZE_T, YYSTACK_ALLOC, YYSTACK_ALLOC_MAXIMUM, YYSTACK_BYTES, YYSTACK_FREE, YYSTACK_RELOCATE, YYSTYPE, YYTABLE_NINF, YYTERROR, and YYTRANSLATE.


Variable Documentation

int yychar

Definition at line 1172 of file ce_parse.cpp.

YYSTYPE yylval

Definition at line 1182 of file ce_parse.cpp.

int yynerrs

Definition at line 1185 of file ce_parse.cpp.

int yytype

Definition at line 1141 of file ce_parse.cpp.

YYSTYPE* yyvaluep

Definition at line 1142 of file ce_parse.cpp.



Generated on Mon Mar 31 10:58:51 2008 by  doxygen 1.5.1