php_parser.c File Reference

#include <stdio.h>

Include dependency graph for php_parser.c:

Go to the source code of this file.

Data Structures

union  yyalloc

Defines

#define YYBISON   1
#define YYBISON_VERSION   "2.1"
#define YYSKELETON_NAME   "php-ast.c"
#define YYPURE   1
#define YYLSP_NEEDED   1
#define T_REQUIRE_ONCE   258
#define T_REQUIRE   259
#define T_EVAL   260
#define T_INCLUDE_ONCE   261
#define T_INCLUDE   262
#define T_LOGICAL_OR   263
#define T_LOGICAL_XOR   264
#define T_LOGICAL_AND   265
#define T_PRINT   266
#define T_SR_EQUAL   267
#define T_SL_EQUAL   268
#define T_XOR_EQUAL   269
#define T_OR_EQUAL   270
#define T_AND_EQUAL   271
#define T_MOD_EQUAL   272
#define T_CONCAT_EQUAL   273
#define T_DIV_EQUAL   274
#define T_MUL_EQUAL   275
#define T_MINUS_EQUAL   276
#define T_PLUS_EQUAL   277
#define T_BOOLEAN_OR   278
#define T_BOOLEAN_AND   279
#define T_IS_NOT_IDENTICAL   280
#define T_IS_IDENTICAL   281
#define T_IS_NOT_EQUAL   282
#define T_IS_EQUAL   283
#define T_IS_GREATER_OR_EQUAL   284
#define T_IS_SMALLER_OR_EQUAL   285
#define T_SR   286
#define T_SL   287
#define T_INSTANCEOF   288
#define T_UNSET_CAST   289
#define T_BOOL_CAST   290
#define T_OBJECT_CAST   291
#define T_ARRAY_CAST   292
#define T_STRING_CAST   293
#define T_DOUBLE_CAST   294
#define T_INT_CAST   295
#define T_DEC   296
#define T_INC   297
#define T_CLONE   298
#define T_NEW   299
#define T_EXIT   300
#define T_IF   301
#define T_ELSEIF   302
#define T_ELSE   303
#define T_ENDIF   304
#define T_LNUMBER   305
#define T_DNUMBER   306
#define T_STRING   307
#define T_STRING_VARNAME   308
#define T_VARIABLE   309
#define T_NUM_STRING   310
#define T_INLINE_HTML   311
#define T_CHARACTER   312
#define T_BAD_CHARACTER   313
#define T_ENCAPSED_AND_WHITESPACE   314
#define T_CONSTANT_ENCAPSED_STRING   315
#define T_ECHO   316
#define T_DO   317
#define T_WHILE   318
#define T_ENDWHILE   319
#define T_FOR   320
#define T_ENDFOR   321
#define T_FOREACH   322
#define T_ENDFOREACH   323
#define T_DECLARE   324
#define T_ENDDECLARE   325
#define T_AS   326
#define T_SWITCH   327
#define T_ENDSWITCH   328
#define T_CASE   329
#define T_DEFAULT   330
#define T_BREAK   331
#define T_CONTINUE   332
#define T_FUNCTION   333
#define T_CONST   334
#define T_RETURN   335
#define T_TRY   336
#define T_CATCH   337
#define T_THROW   338
#define T_USE   339
#define T_GLOBAL   340
#define T_PUBLIC   341
#define T_PROTECTED   342
#define T_PRIVATE   343
#define T_FINAL   344
#define T_ABSTRACT   345
#define T_STATIC   346
#define T_VAR   347
#define T_UNSET   348
#define T_ISSET   349
#define T_EMPTY   350
#define T_HALT_COMPILER   351
#define T_CLASS   352
#define T_INTERFACE   353
#define T_EXTENDS   354
#define T_IMPLEMENTS   355
#define T_OBJECT_OPERATOR   356
#define T_DOUBLE_ARROW   357
#define T_LIST   358
#define T_ARRAY   359
#define T_CLASS_C   360
#define T_METHOD_C   361
#define T_FUNC_C   362
#define T_LINE   363
#define T_FILE   364
#define T_COMMENT   365
#define T_DOC_COMMENT   366
#define T_OPEN_TAG   367
#define T_OPEN_TAG_WITH_ECHO   368
#define T_CLOSE_TAG   369
#define T_WHITESPACE   370
#define T_START_HEREDOC   371
#define T_END_HEREDOC   372
#define T_DOLLAR_OPEN_CURLY_BRACES   373
#define T_CURLY_OPEN   374
#define T_PAAMAYIM_NEKUDOTAYIM   375
#define T_ASPECT   376
#define T_BEFORE   377
#define T_AROUND   378
#define T_AFTER   379
#define T_POINTCUT   380
#define T_EXEC   381
#define T_CALL   382
#define T_SET   383
#define T_GET   384
#define T_THIS   385
#define T_WITHIN   386
#define YYERROR_VERBOSE
#define YYSTYPE   char*
#define YYDEBUG   0
#define YYERROR_VERBOSE   1
#define YYTOKEN_TABLE   0
#define YYSIZE_T   unsigned int
#define YY_(msgid)   msgid
#define XML_ALLOC(X)   malloc(X)
#define XML_FREE(X)   free(X)
#define YYSTACK_ALLOC   YYMALLOC
#define YYSTACK_FREE   YYFREE
#define YYSTACK_ALLOC_MAXIMUM   ((YYSIZE_T) -1)
#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   3
#define YYLAST   4343
#define YYNTOKENS   161
#define YYNNTS   181
#define YYNRULES   471
#define YYNSTATES   952
#define YYUNDEFTOK   2
#define YYMAXUTOK   386
#define YYTRANSLATE(YYX)   ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
#define YYPACT_NINF   -819
#define YYTABLE_NINF   -400
#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 (&yylval)
#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 YYYAXX_XML   "yaxx.xml"
#define YYYAXX_DTD   "yaxx.dtd"
#define YYPOPSTACK   (yyvsp--, yyxsp--, yyssp--)
#define YYERROR_VERBOSE_ARGS_MAXIMUM   5

Typedefs

typedef short int yysigned_char

Enumerations

enum  yytokentype {
  T_REQUIRE_ONCE = 258, T_REQUIRE = 259, T_EVAL = 260, T_INCLUDE_ONCE = 261,
  T_INCLUDE = 262, T_LOGICAL_OR = 263, T_LOGICAL_XOR = 264, T_LOGICAL_AND = 265,
  T_PRINT = 266, T_SR_EQUAL = 267, T_SL_EQUAL = 268, T_XOR_EQUAL = 269,
  T_OR_EQUAL = 270, T_AND_EQUAL = 271, T_MOD_EQUAL = 272, T_CONCAT_EQUAL = 273,
  T_DIV_EQUAL = 274, T_MUL_EQUAL = 275, T_MINUS_EQUAL = 276, T_PLUS_EQUAL = 277,
  T_BOOLEAN_OR = 278, T_BOOLEAN_AND = 279, T_IS_NOT_IDENTICAL = 280, T_IS_IDENTICAL = 281,
  T_IS_NOT_EQUAL = 282, T_IS_EQUAL = 283, T_IS_GREATER_OR_EQUAL = 284, T_IS_SMALLER_OR_EQUAL = 285,
  T_SR = 286, T_SL = 287, T_INSTANCEOF = 288, T_UNSET_CAST = 289,
  T_BOOL_CAST = 290, T_OBJECT_CAST = 291, T_ARRAY_CAST = 292, T_STRING_CAST = 293,
  T_DOUBLE_CAST = 294, T_INT_CAST = 295, T_DEC = 296, T_INC = 297,
  T_CLONE = 298, T_NEW = 299, T_EXIT = 300, T_IF = 301,
  T_ELSEIF = 302, T_ELSE = 303, T_ENDIF = 304, T_LNUMBER = 305,
  T_DNUMBER = 306, T_STRING = 307, T_STRING_VARNAME = 308, T_VARIABLE = 309,
  T_NUM_STRING = 310, T_INLINE_HTML = 311, T_CHARACTER = 312, T_BAD_CHARACTER = 313,
  T_ENCAPSED_AND_WHITESPACE = 314, T_CONSTANT_ENCAPSED_STRING = 315, T_ECHO = 316, T_DO = 317,
  T_WHILE = 318, T_ENDWHILE = 319, T_FOR = 320, T_ENDFOR = 321,
  T_FOREACH = 322, T_ENDFOREACH = 323, T_DECLARE = 324, T_ENDDECLARE = 325,
  T_AS = 326, T_SWITCH = 327, T_ENDSWITCH = 328, T_CASE = 329,
  T_DEFAULT = 330, T_BREAK = 331, T_CONTINUE = 332, T_FUNCTION = 333,
  T_CONST = 334, T_RETURN = 335, T_TRY = 336, T_CATCH = 337,
  T_THROW = 338, T_USE = 339, T_GLOBAL = 340, T_PUBLIC = 341,
  T_PROTECTED = 342, T_PRIVATE = 343, T_FINAL = 344, T_ABSTRACT = 345,
  T_STATIC = 346, T_VAR = 347, T_UNSET = 348, T_ISSET = 349,
  T_EMPTY = 350, T_HALT_COMPILER = 351, T_CLASS = 352, T_INTERFACE = 353,
  T_EXTENDS = 354, T_IMPLEMENTS = 355, T_OBJECT_OPERATOR = 356, T_DOUBLE_ARROW = 357,
  T_LIST = 358, T_ARRAY = 359, T_CLASS_C = 360, T_METHOD_C = 361,
  T_FUNC_C = 362, T_LINE = 363, T_FILE = 364, T_COMMENT = 365,
  T_DOC_COMMENT = 366, T_OPEN_TAG = 367, T_OPEN_TAG_WITH_ECHO = 368, T_CLOSE_TAG = 369,
  T_WHITESPACE = 370, T_START_HEREDOC = 371, T_END_HEREDOC = 372, T_DOLLAR_OPEN_CURLY_BRACES = 373,
  T_CURLY_OPEN = 374, T_PAAMAYIM_NEKUDOTAYIM = 375, T_ASPECT = 376, T_BEFORE = 377,
  T_AROUND = 378, T_AFTER = 379, T_POINTCUT = 380, T_EXEC = 381,
  T_CALL = 382, T_SET = 383, T_GET = 384, T_THIS = 385,
  T_WITHIN = 386, T_REQUIRE_ONCE = 258, T_REQUIRE = 259, T_EVAL = 260,
  T_INCLUDE_ONCE = 261, T_INCLUDE = 262, T_LOGICAL_OR = 263, T_LOGICAL_XOR = 264,
  T_LOGICAL_AND = 265, T_PRINT = 266, T_SR_EQUAL = 267, T_SL_EQUAL = 268,
  T_XOR_EQUAL = 269, T_OR_EQUAL = 270, T_AND_EQUAL = 271, T_MOD_EQUAL = 272,
  T_CONCAT_EQUAL = 273, T_DIV_EQUAL = 274, T_MUL_EQUAL = 275, T_MINUS_EQUAL = 276,
  T_PLUS_EQUAL = 277, T_BOOLEAN_OR = 278, T_BOOLEAN_AND = 279, T_IS_NOT_IDENTICAL = 280,
  T_IS_IDENTICAL = 281, T_IS_NOT_EQUAL = 282, T_IS_EQUAL = 283, T_IS_GREATER_OR_EQUAL = 284,
  T_IS_SMALLER_OR_EQUAL = 285, T_SR = 286, T_SL = 287, T_INSTANCEOF = 288,
  T_UNSET_CAST = 289, T_BOOL_CAST = 290, T_OBJECT_CAST = 291, T_ARRAY_CAST = 292,
  T_STRING_CAST = 293, T_DOUBLE_CAST = 294, T_INT_CAST = 295, T_DEC = 296,
  T_INC = 297, T_CLONE = 298, T_NEW = 299, T_EXIT = 300,
  T_IF = 301, T_ELSEIF = 302, T_ELSE = 303, T_ENDIF = 304,
  T_LNUMBER = 305, T_DNUMBER = 306, T_STRING = 307, T_STRING_VARNAME = 308,
  T_VARIABLE = 309, T_NUM_STRING = 310, T_INLINE_HTML = 311, T_CHARACTER = 312,
  T_BAD_CHARACTER = 313, T_ENCAPSED_AND_WHITESPACE = 314, T_CONSTANT_ENCAPSED_STRING = 315, T_ECHO = 316,
  T_DO = 317, T_WHILE = 318, T_ENDWHILE = 319, T_FOR = 320,
  T_ENDFOR = 321, T_FOREACH = 322, T_ENDFOREACH = 323, T_DECLARE = 324,
  T_ENDDECLARE = 325, T_AS = 326, T_SWITCH = 327, T_ENDSWITCH = 328,
  T_CASE = 329, T_DEFAULT = 330, T_BREAK = 331, T_CONTINUE = 332,
  T_FUNCTION = 333, T_CONST = 334, T_RETURN = 335, T_TRY = 336,
  T_CATCH = 337, T_THROW = 338, T_USE = 339, T_GLOBAL = 340,
  T_PUBLIC = 341, T_PROTECTED = 342, T_PRIVATE = 343, T_FINAL = 344,
  T_ABSTRACT = 345, T_STATIC = 346, T_VAR = 347, T_UNSET = 348,
  T_ISSET = 349, T_EMPTY = 350, T_HALT_COMPILER = 351, T_CLASS = 352,
  T_INTERFACE = 353, T_EXTENDS = 354, T_IMPLEMENTS = 355, T_OBJECT_OPERATOR = 356,
  T_DOUBLE_ARROW = 357, T_LIST = 358, T_ARRAY = 359, T_CLASS_C = 360,
  T_METHOD_C = 361, T_FUNC_C = 362, T_LINE = 363, T_FILE = 364,
  T_COMMENT = 365, T_DOC_COMMENT = 366, T_OPEN_TAG = 367, T_OPEN_TAG_WITH_ECHO = 368,
  T_CLOSE_TAG = 369, T_WHITESPACE = 370, T_START_HEREDOC = 371, T_END_HEREDOC = 372,
  T_DOLLAR_OPEN_CURLY_BRACES = 373, T_CURLY_OPEN = 374, T_PAAMAYIM_NEKUDOTAYIM = 375, T_ASPECT = 376,
  T_BEFORE = 377, T_AROUND = 378, T_AFTER = 379, T_POINTCUT = 380,
  T_EXEC = 381, T_CALL = 382, T_SET = 383, T_GET = 384,
  T_THIS = 385, T_WITHIN = 386
}

Functions

void yyerror (char *s)
int yylex ()
int yywrap ()
int yylocationp ()
int getLineno ()
static unsigned int yystrlen (char *yystr) const
static char * yystpcpy (char *yydest, const char *yysrc)
static unsigned int yytnamerr (char *yyres, const char *yystr)
static void yydestruct (char *yymsg, int yytype, char **yyvaluep) const
int yyparse ()
static char * YYTNAME (int r)
 replace character terminals into symbolic terminals
static void replace_entity (char c, char *s)
 replace a special character in the text into an entity
static char * xml_encode (char ch)
 replace the special characters in the text into entities
static void replace_special_entities (char *text, char *text_out)
static void generate_xml_output (char **yyxsp, char **yyxs)

Variables

char * file_name
char * _xml_output
int _error = 0
static const
unsigned char 
yytranslate []
static const
unsigned short int 
yyprhs []
static const short int yyrhs []
static const
unsigned short int 
yyrline []
static const char *const yytname []
static const
unsigned short int 
yyr1 []
static const
unsigned char 
yyr2 []
static const
unsigned short int 
yydefact []
static const short int yydefgoto []
static const short int yypact []
static const short int yypgoto []
static const short int yytable []
static const short int yycheck []
static const
unsigned short int 
yystos []
static char * yytext_buf = NULL
char * yytext = NULL


Define Documentation

#define T_ABSTRACT   345

Definition at line 278 of file php_parser.c.

Referenced by yylex().

#define T_AFTER   379

Definition at line 312 of file php_parser.c.

Referenced by yylex().

#define T_AND_EQUAL   271

Definition at line 204 of file php_parser.c.

Referenced by yylex().

#define T_AROUND   378

Definition at line 311 of file php_parser.c.

Referenced by yylex().

#define T_ARRAY   359

Definition at line 292 of file php_parser.c.

Referenced by yylex().

#define T_ARRAY_CAST   292

Definition at line 225 of file php_parser.c.

Referenced by yylex().

#define T_AS   326

Definition at line 259 of file php_parser.c.

Referenced by yylex().

#define T_ASPECT   376

Definition at line 309 of file php_parser.c.

Referenced by yylex().

#define T_BAD_CHARACTER   313

Definition at line 246 of file php_parser.c.

Referenced by yylex().

#define T_BEFORE   377

Definition at line 310 of file php_parser.c.

Referenced by yylex().

#define T_BOOL_CAST   290

Definition at line 223 of file php_parser.c.

Referenced by yylex().

#define T_BOOLEAN_AND   279

Definition at line 212 of file php_parser.c.

Referenced by yylex().

#define T_BOOLEAN_OR   278

Definition at line 211 of file php_parser.c.

Referenced by yylex().

#define T_BREAK   331

Definition at line 264 of file php_parser.c.

Referenced by yylex().

#define T_CALL   382

Definition at line 315 of file php_parser.c.

Referenced by yylex().

#define T_CASE   329

Definition at line 262 of file php_parser.c.

Referenced by yylex().

#define T_CATCH   337

Definition at line 270 of file php_parser.c.

Referenced by yylex().

#define T_CHARACTER   312

Definition at line 245 of file php_parser.c.

Referenced by yylex().

#define T_CLASS   352

Definition at line 285 of file php_parser.c.

Referenced by yylex().

#define T_CLASS_C   360

Definition at line 293 of file php_parser.c.

Referenced by yylex().

#define T_CLONE   298

Definition at line 231 of file php_parser.c.

Referenced by yylex().

#define T_CLOSE_TAG   369

Definition at line 302 of file php_parser.c.

#define T_COMMENT   365

Definition at line 298 of file php_parser.c.

#define T_CONCAT_EQUAL   273

Definition at line 206 of file php_parser.c.

Referenced by yylex().

#define T_CONST   334

Definition at line 267 of file php_parser.c.

Referenced by yylex().

#define T_CONSTANT_ENCAPSED_STRING   315

Definition at line 248 of file php_parser.c.

Referenced by yylex().

#define T_CONTINUE   332

Definition at line 265 of file php_parser.c.

Referenced by yylex().

#define T_CURLY_OPEN   374

Definition at line 307 of file php_parser.c.

Referenced by yylex().

#define T_DEC   296

Definition at line 229 of file php_parser.c.

Referenced by yylex().

#define T_DECLARE   324

Definition at line 257 of file php_parser.c.

Referenced by yylex().

#define T_DEFAULT   330

Definition at line 263 of file php_parser.c.

Referenced by yylex().

#define T_DIV_EQUAL   274

Definition at line 207 of file php_parser.c.

Referenced by yylex().

#define T_DNUMBER   306

Definition at line 239 of file php_parser.c.

Referenced by yylex().

#define T_DO   317

Definition at line 250 of file php_parser.c.

Referenced by yylex().

#define T_DOC_COMMENT   366

Definition at line 299 of file php_parser.c.

#define T_DOLLAR_OPEN_CURLY_BRACES   373

Definition at line 306 of file php_parser.c.

Referenced by yylex().

#define T_DOUBLE_ARROW   357

Definition at line 290 of file php_parser.c.

Referenced by yylex().

#define T_DOUBLE_CAST   294

Definition at line 227 of file php_parser.c.

Referenced by yylex().

#define T_ECHO   316

Definition at line 249 of file php_parser.c.

Referenced by yylex().

#define T_ELSE   303

Definition at line 236 of file php_parser.c.

Referenced by yylex().

#define T_ELSEIF   302

Definition at line 235 of file php_parser.c.

Referenced by yylex().

#define T_EMPTY   350

Definition at line 283 of file php_parser.c.

Referenced by yylex().

#define T_ENCAPSED_AND_WHITESPACE   314

Definition at line 247 of file php_parser.c.

Referenced by yylex().

#define T_END_HEREDOC   372

Definition at line 305 of file php_parser.c.

Referenced by yylex().

#define T_ENDDECLARE   325

Definition at line 258 of file php_parser.c.

Referenced by yylex().

#define T_ENDFOR   321

Definition at line 254 of file php_parser.c.

Referenced by yylex().

#define T_ENDFOREACH   323

Definition at line 256 of file php_parser.c.

Referenced by yylex().

#define T_ENDIF   304

Definition at line 237 of file php_parser.c.

Referenced by yylex().

#define T_ENDSWITCH   328

Definition at line 261 of file php_parser.c.

Referenced by yylex().

#define T_ENDWHILE   319

Definition at line 252 of file php_parser.c.

Referenced by yylex().

#define T_EVAL   260

Definition at line 193 of file php_parser.c.

Referenced by yylex().

#define T_EXEC   381

Definition at line 314 of file php_parser.c.

Referenced by yylex().

#define T_EXIT   300

Definition at line 233 of file php_parser.c.

Referenced by yylex().

#define T_EXTENDS   354

Definition at line 287 of file php_parser.c.

Referenced by yylex().

#define T_FILE   364

Definition at line 297 of file php_parser.c.

Referenced by yylex().

#define T_FINAL   344

Definition at line 277 of file php_parser.c.

Referenced by yylex().

#define T_FOR   320

Definition at line 253 of file php_parser.c.

Referenced by yylex().

#define T_FOREACH   322

Definition at line 255 of file php_parser.c.

Referenced by yylex().

#define T_FUNC_C   362

Definition at line 295 of file php_parser.c.

Referenced by yylex().

#define T_FUNCTION   333

Definition at line 266 of file php_parser.c.

Referenced by yylex().

#define T_GET   384

Definition at line 317 of file php_parser.c.

Referenced by yylex().

#define T_GLOBAL   340

Definition at line 273 of file php_parser.c.

Referenced by yylex().

#define T_HALT_COMPILER   351

Definition at line 284 of file php_parser.c.

Referenced by yylex().

#define T_IF   301

Definition at line 234 of file php_parser.c.

Referenced by yylex().

#define T_IMPLEMENTS   355

Definition at line 288 of file php_parser.c.

Referenced by yylex().

#define T_INC   297

Definition at line 230 of file php_parser.c.

Referenced by yylex().

#define T_INCLUDE   262

Definition at line 195 of file php_parser.c.

Referenced by yylex().

#define T_INCLUDE_ONCE   261

Definition at line 194 of file php_parser.c.

Referenced by yylex().

#define T_INLINE_HTML   311

Definition at line 244 of file php_parser.c.

Referenced by yylex().

#define T_INSTANCEOF   288

Definition at line 221 of file php_parser.c.

Referenced by yylex().

#define T_INT_CAST   295

Definition at line 228 of file php_parser.c.

Referenced by yylex().

#define T_INTERFACE   353

Definition at line 286 of file php_parser.c.

Referenced by yylex().

#define T_IS_EQUAL   283

Definition at line 216 of file php_parser.c.

Referenced by yylex().

#define T_IS_GREATER_OR_EQUAL   284

Definition at line 217 of file php_parser.c.

Referenced by yylex().

#define T_IS_IDENTICAL   281

Definition at line 214 of file php_parser.c.

Referenced by yylex().

#define T_IS_NOT_EQUAL   282

Definition at line 215 of file php_parser.c.

Referenced by yylex().

#define T_IS_NOT_IDENTICAL   280

Definition at line 213 of file php_parser.c.

Referenced by yylex().

#define T_IS_SMALLER_OR_EQUAL   285

Definition at line 218 of file php_parser.c.

Referenced by yylex().

#define T_ISSET   349

Definition at line 282 of file php_parser.c.

Referenced by yylex().

#define T_LINE   363

Definition at line 296 of file php_parser.c.

Referenced by yylex().

#define T_LIST   358

Definition at line 291 of file php_parser.c.

Referenced by yylex().

#define T_LNUMBER   305

Definition at line 238 of file php_parser.c.

Referenced by yylex().

#define T_LOGICAL_AND   265

Definition at line 198 of file php_parser.c.

Referenced by yylex().

#define T_LOGICAL_OR   263

Definition at line 196 of file php_parser.c.

Referenced by yylex().

#define T_LOGICAL_XOR   264

Definition at line 197 of file php_parser.c.

Referenced by yylex().

#define T_METHOD_C   361

Definition at line 294 of file php_parser.c.

Referenced by yylex().

#define T_MINUS_EQUAL   276

Definition at line 209 of file php_parser.c.

Referenced by yylex().

#define T_MOD_EQUAL   272

Definition at line 205 of file php_parser.c.

Referenced by yylex().

#define T_MUL_EQUAL   275

Definition at line 208 of file php_parser.c.

Referenced by yylex().

#define T_NEW   299

Definition at line 232 of file php_parser.c.

Referenced by yylex().

#define T_NUM_STRING   310

Definition at line 243 of file php_parser.c.

Referenced by yylex().

#define T_OBJECT_CAST   291

Definition at line 224 of file php_parser.c.

Referenced by yylex().

#define T_OBJECT_OPERATOR   356

Definition at line 289 of file php_parser.c.

Referenced by yylex().

#define T_OPEN_TAG   367

Definition at line 300 of file php_parser.c.

#define T_OPEN_TAG_WITH_ECHO   368

Definition at line 301 of file php_parser.c.

#define T_OR_EQUAL   270

Definition at line 203 of file php_parser.c.

Referenced by yylex().

#define T_PAAMAYIM_NEKUDOTAYIM   375

Definition at line 308 of file php_parser.c.

Referenced by yylex().

#define T_PLUS_EQUAL   277

Definition at line 210 of file php_parser.c.

Referenced by yylex().

#define T_POINTCUT   380

Definition at line 313 of file php_parser.c.

Referenced by yylex().

#define T_PRINT   266

Definition at line 199 of file php_parser.c.

Referenced by yylex().

#define T_PRIVATE   343

Definition at line 276 of file php_parser.c.

Referenced by yylex().

#define T_PROTECTED   342

Definition at line 275 of file php_parser.c.

Referenced by yylex().

#define T_PUBLIC   341

Definition at line 274 of file php_parser.c.

Referenced by yylex().

#define T_REQUIRE   259

Definition at line 192 of file php_parser.c.

Referenced by yylex().

#define T_REQUIRE_ONCE   258

Definition at line 191 of file php_parser.c.

Referenced by yylex().

#define T_RETURN   335

Definition at line 268 of file php_parser.c.

Referenced by yylex().

#define T_SET   383

Definition at line 316 of file php_parser.c.

Referenced by yylex().

#define T_SL   287

Definition at line 220 of file php_parser.c.

Referenced by yylex().

#define T_SL_EQUAL   268

Definition at line 201 of file php_parser.c.

Referenced by yylex().

#define T_SR   286

Definition at line 219 of file php_parser.c.

Referenced by yylex().

#define T_SR_EQUAL   267

Definition at line 200 of file php_parser.c.

Referenced by yylex().

#define T_START_HEREDOC   371

Definition at line 304 of file php_parser.c.

Referenced by yylex().

#define T_STATIC   346

Definition at line 279 of file php_parser.c.

Referenced by yylex().

#define T_STRING   307

Definition at line 240 of file php_parser.c.

Referenced by yylex().

#define T_STRING_CAST   293

Definition at line 226 of file php_parser.c.

Referenced by yylex().

#define T_STRING_VARNAME   308

Definition at line 241 of file php_parser.c.

Referenced by yylex().

#define T_SWITCH   327

Definition at line 260 of file php_parser.c.

Referenced by yylex().

#define T_THIS   385

Definition at line 318 of file php_parser.c.

Referenced by yylex().

#define T_THROW   338

Definition at line 271 of file php_parser.c.

Referenced by yylex().

#define T_TRY   336

Definition at line 269 of file php_parser.c.

Referenced by yylex().

#define T_UNSET   348

Definition at line 281 of file php_parser.c.

Referenced by yylex().

#define T_UNSET_CAST   289

Definition at line 222 of file php_parser.c.

Referenced by yylex().

#define T_USE   339

Definition at line 272 of file php_parser.c.

Referenced by yylex().

#define T_VAR   347

Definition at line 280 of file php_parser.c.

Referenced by yylex().

#define T_VARIABLE   309

Definition at line 242 of file php_parser.c.

Referenced by yylex().

#define T_WHILE   318

Definition at line 251 of file php_parser.c.

Referenced by yylex().

#define T_WHITESPACE   370

Definition at line 303 of file php_parser.c.

#define T_WITHIN   386

Definition at line 319 of file php_parser.c.

Referenced by yylex().

#define T_XOR_EQUAL   269

Definition at line 202 of file php_parser.c.

Referenced by yylex().

#define XML_ALLOC (  )     malloc(X)

Definition at line 433 of file php_parser.c.

#define XML_FREE (  )     free(X)

Definition at line 434 of file php_parser.c.

#define YY_ ( msgid   )     msgid

Definition at line 424 of file php_parser.c.

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

Definition at line 2425 of file php_parser.c.

#define YY_REDUCE_PRINT ( Rule   ) 

Definition at line 2528 of file php_parser.c.

#define YY_STACK_PRINT ( Bottom,
Top   ) 

Definition at line 2527 of file php_parser.c.

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

Definition at line 2526 of file php_parser.c.

Referenced by yydestruct().

#define YYABORT   goto yyabortlab

Definition at line 2354 of file php_parser.c.

#define YYACCEPT   goto yyacceptlab

Definition at line 2353 of file php_parser.c.

#define YYBACKUP ( Token,
Value   ) 

Value:

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

Definition at line 2366 of file php_parser.c.

#define YYBISON   1

Definition at line 37 of file php_parser.c.

#define YYBISON_VERSION   "2.1"

Definition at line 40 of file php_parser.c.

#define yyclearin   (yychar = YYEMPTY)

Definition at line 2349 of file php_parser.c.

#define YYCOPY ( To,
From,
Count   ) 

Value:

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

Definition at line 517 of file php_parser.c.

#define YYDEBUG   0

Definition at line 371 of file php_parser.c.

#define YYDPRINTF ( Args   ) 

Definition at line 2525 of file php_parser.c.

#define YYEMPTY   (-2)

Definition at line 2350 of file php_parser.c.

#define YYEOF   0

Definition at line 2351 of file php_parser.c.

#define YYERRCODE   256

Definition at line 2385 of file php_parser.c.

#define yyerrok   (yyerrstatus = 0)

Definition at line 2348 of file php_parser.c.

#define YYERROR   goto yyerrorlab

Definition at line 2355 of file php_parser.c.

#define YYERROR_VERBOSE   1

Definition at line 377 of file php_parser.c.

#define YYERROR_VERBOSE

Definition at line 377 of file php_parser.c.

#define YYERROR_VERBOSE_ARGS_MAXIMUM   5

#define YYFAIL   goto yyerrlab

Definition at line 2362 of file php_parser.c.

#define YYFINAL   3

Definition at line 553 of file php_parser.c.

#define YYFREE   free

Definition at line 476 of file php_parser.c.

#define YYINITDEPTH   200

Definition at line 2534 of file php_parser.c.

#define YYLAST   4343

Definition at line 555 of file php_parser.c.

#define YYLEX   yylex (&yylval)

Definition at line 2435 of file php_parser.c.

#define YYLLOC_DEFAULT ( Current,
Rhs,
 ) 

Value:

do                                  \
      if (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 (0)

Definition at line 2394 of file php_parser.c.

#define YYLSP_NEEDED   1

Definition at line 49 of file php_parser.c.

#define YYMALLOC   malloc

Definition at line 469 of file php_parser.c.

#define YYMAXDEPTH   10000

Definition at line 2545 of file php_parser.c.

#define YYMAXUTOK   386

Definition at line 568 of file php_parser.c.

#define YYNNTS   181

Definition at line 560 of file php_parser.c.

#define YYNRULES   471

Definition at line 562 of file php_parser.c.

#define YYNSTATES   952

Definition at line 564 of file php_parser.c.

#define YYNTOKENS   161

Definition at line 558 of file php_parser.c.

#define YYPACT_NINF   -819

Definition at line 1238 of file php_parser.c.

#define YYPOPSTACK   (yyvsp--, yyxsp--, yyssp--)

#define YYPURE   1

Definition at line 46 of file php_parser.c.

 
#define YYRECOVERING (  )     (!!yyerrstatus)

Definition at line 2364 of file php_parser.c.

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

Definition at line 2392 of file php_parser.c.

#define YYSIZE_T   unsigned int

Definition at line 413 of file php_parser.c.

Referenced by yytnamerr().

#define YYSKELETON_NAME   "php-ast.c"

Definition at line 43 of file php_parser.c.

#define YYSTACK_ALLOC   YYMALLOC

Definition at line 460 of file php_parser.c.

Referenced by replace_entity().

#define YYSTACK_ALLOC_MAXIMUM   ((YYSIZE_T) -1)

Definition at line 463 of file php_parser.c.

#define YYSTACK_BYTES (  ) 

Value:

((N) * (sizeof (short int) + sizeof (YYSTYPE))              \
     + sizeof(char *) \
      + YYSTACK_GAP_MAXIMUM)

Definition at line 505 of file php_parser.c.

#define YYSTACK_FREE   YYFREE

Definition at line 461 of file php_parser.c.

Referenced by replace_entity().

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

Definition at line 501 of file php_parser.c.

#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 (0)

Definition at line 533 of file php_parser.c.

#define YYSTYPE   char*

Definition at line 358 of file php_parser.c.

#define YYTABLE_NINF   -400

Definition at line 1367 of file php_parser.c.

#define YYTERROR   1

Definition at line 2384 of file php_parser.c.

#define YYTOKEN_TABLE   0

Definition at line 384 of file php_parser.c.

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

Definition at line 570 of file php_parser.c.

#define YYUNDEFTOK   2

Definition at line 567 of file php_parser.c.

#define YYYAXX_DTD   "yaxx.dtd"

#define YYYAXX_XML   "yaxx.xml"


Typedef Documentation

typedef short int yysigned_char

Definition at line 549 of file php_parser.c.


Enumeration Type Documentation

enum yytokentype

Enumerator:
T_REQUIRE_ONCE 
T_REQUIRE 
T_EVAL 
T_INCLUDE_ONCE 
T_INCLUDE 
T_LOGICAL_OR 
T_LOGICAL_XOR 
T_LOGICAL_AND 
T_PRINT 
T_SR_EQUAL 
T_SL_EQUAL 
T_XOR_EQUAL 
T_OR_EQUAL 
T_AND_EQUAL 
T_MOD_EQUAL 
T_CONCAT_EQUAL 
T_DIV_EQUAL 
T_MUL_EQUAL 
T_MINUS_EQUAL 
T_PLUS_EQUAL 
T_BOOLEAN_OR 
T_BOOLEAN_AND 
T_IS_NOT_IDENTICAL 
T_IS_IDENTICAL 
T_IS_NOT_EQUAL 
T_IS_EQUAL 
T_IS_GREATER_OR_EQUAL 
T_IS_SMALLER_OR_EQUAL 
T_SR 
T_SL 
T_INSTANCEOF 
T_UNSET_CAST 
T_BOOL_CAST 
T_OBJECT_CAST 
T_ARRAY_CAST 
T_STRING_CAST 
T_DOUBLE_CAST 
T_INT_CAST 
T_DEC 
T_INC 
T_CLONE 
T_NEW 
T_EXIT 
T_IF 
T_ELSEIF 
T_ELSE 
T_ENDIF 
T_LNUMBER 
T_DNUMBER 
T_STRING 
T_STRING_VARNAME 
T_VARIABLE 
T_NUM_STRING 
T_INLINE_HTML 
T_CHARACTER 
T_BAD_CHARACTER 
T_ENCAPSED_AND_WHITESPACE 
T_CONSTANT_ENCAPSED_STRING 
T_ECHO 
T_DO 
T_WHILE 
T_ENDWHILE 
T_FOR 
T_ENDFOR 
T_FOREACH 
T_ENDFOREACH 
T_DECLARE 
T_ENDDECLARE 
T_AS 
T_SWITCH 
T_ENDSWITCH 
T_CASE 
T_DEFAULT 
T_BREAK 
T_CONTINUE 
T_FUNCTION 
T_CONST 
T_RETURN 
T_TRY 
T_CATCH 
T_THROW 
T_USE 
T_GLOBAL 
T_PUBLIC 
T_PROTECTED 
T_PRIVATE 
T_FINAL 
T_ABSTRACT 
T_STATIC 
T_VAR 
T_UNSET 
T_ISSET 
T_EMPTY 
T_HALT_COMPILER 
T_CLASS 
T_INTERFACE 
T_EXTENDS 
T_IMPLEMENTS 
T_OBJECT_OPERATOR 
T_DOUBLE_ARROW 
T_LIST 
T_ARRAY 
T_CLASS_C 
T_METHOD_C 
T_FUNC_C 
T_LINE 
T_FILE 
T_COMMENT 
T_DOC_COMMENT 
T_OPEN_TAG 
T_OPEN_TAG_WITH_ECHO 
T_CLOSE_TAG 
T_WHITESPACE 
T_START_HEREDOC 
T_END_HEREDOC 
T_DOLLAR_OPEN_CURLY_BRACES 
T_CURLY_OPEN 
T_PAAMAYIM_NEKUDOTAYIM 
T_ASPECT 
T_BEFORE 
T_AROUND 
T_AFTER 
T_POINTCUT 
T_EXEC 
T_CALL 
T_SET 
T_GET 
T_THIS 
T_WITHIN 
T_REQUIRE_ONCE 
T_REQUIRE 
T_EVAL 
T_INCLUDE_ONCE 
T_INCLUDE 
T_LOGICAL_OR 
T_LOGICAL_XOR 
T_LOGICAL_AND 
T_PRINT 
T_SR_EQUAL 
T_SL_EQUAL 
T_XOR_EQUAL 
T_OR_EQUAL 
T_AND_EQUAL 
T_MOD_EQUAL 
T_CONCAT_EQUAL 
T_DIV_EQUAL 
T_MUL_EQUAL 
T_MINUS_EQUAL 
T_PLUS_EQUAL 
T_BOOLEAN_OR 
T_BOOLEAN_AND 
T_IS_NOT_IDENTICAL 
T_IS_IDENTICAL 
T_IS_NOT_EQUAL 
T_IS_EQUAL 
T_IS_GREATER_OR_EQUAL 
T_IS_SMALLER_OR_EQUAL 
T_SR 
T_SL 
T_INSTANCEOF 
T_UNSET_CAST 
T_BOOL_CAST 
T_OBJECT_CAST 
T_ARRAY_CAST 
T_STRING_CAST 
T_DOUBLE_CAST 
T_INT_CAST 
T_DEC 
T_INC 
T_CLONE 
T_NEW 
T_EXIT 
T_IF 
T_ELSEIF 
T_ELSE 
T_ENDIF 
T_LNUMBER 
T_DNUMBER 
T_STRING 
T_STRING_VARNAME 
T_VARIABLE 
T_NUM_STRING 
T_INLINE_HTML 
T_CHARACTER 
T_BAD_CHARACTER 
T_ENCAPSED_AND_WHITESPACE 
T_CONSTANT_ENCAPSED_STRING 
T_ECHO 
T_DO 
T_WHILE 
T_ENDWHILE 
T_FOR 
T_ENDFOR 
T_FOREACH 
T_ENDFOREACH 
T_DECLARE 
T_ENDDECLARE 
T_AS 
T_SWITCH 
T_ENDSWITCH 
T_CASE 
T_DEFAULT 
T_BREAK 
T_CONTINUE 
T_FUNCTION 
T_CONST 
T_RETURN 
T_TRY 
T_CATCH 
T_THROW 
T_USE 
T_GLOBAL 
T_PUBLIC 
T_PROTECTED 
T_PRIVATE 
T_FINAL 
T_ABSTRACT 
T_STATIC 
T_VAR 
T_UNSET 
T_ISSET 
T_EMPTY 
T_HALT_COMPILER 
T_CLASS 
T_INTERFACE 
T_EXTENDS 
T_IMPLEMENTS 
T_OBJECT_OPERATOR 
T_DOUBLE_ARROW 
T_LIST 
T_ARRAY 
T_CLASS_C 
T_METHOD_C 
T_FUNC_C 
T_LINE 
T_FILE 
T_COMMENT 
T_DOC_COMMENT 
T_OPEN_TAG 
T_OPEN_TAG_WITH_ECHO 
T_CLOSE_TAG 
T_WHITESPACE 
T_START_HEREDOC 
T_END_HEREDOC 
T_DOLLAR_OPEN_CURLY_BRACES 
T_CURLY_OPEN 
T_PAAMAYIM_NEKUDOTAYIM 
T_ASPECT 
T_BEFORE 
T_AROUND 
T_AFTER 
T_POINTCUT 
T_EXEC 
T_CALL 
T_SET 
T_GET 
T_THIS 
T_WITHIN 

Definition at line 58 of file php_parser.c.

00058                     {
00059      T_REQUIRE_ONCE = 258,
00060      T_REQUIRE = 259,
00061      T_EVAL = 260,
00062      T_INCLUDE_ONCE = 261,
00063      T_INCLUDE = 262,
00064      T_LOGICAL_OR = 263,
00065      T_LOGICAL_XOR = 264,
00066      T_LOGICAL_AND = 265,
00067      T_PRINT = 266,
00068      T_SR_EQUAL = 267,
00069      T_SL_EQUAL = 268,
00070      T_XOR_EQUAL = 269,
00071      T_OR_EQUAL = 270,
00072      T_AND_EQUAL = 271,
00073      T_MOD_EQUAL = 272,
00074      T_CONCAT_EQUAL = 273,
00075      T_DIV_EQUAL = 274,
00076      T_MUL_EQUAL = 275,
00077      T_MINUS_EQUAL = 276,
00078      T_PLUS_EQUAL = 277,
00079      T_BOOLEAN_OR = 278,
00080      T_BOOLEAN_AND = 279,
00081      T_IS_NOT_IDENTICAL = 280,
00082      T_IS_IDENTICAL = 281,
00083      T_IS_NOT_EQUAL = 282,
00084      T_IS_EQUAL = 283,
00085      T_IS_GREATER_OR_EQUAL = 284,
00086      T_IS_SMALLER_OR_EQUAL = 285,
00087      T_SR = 286,
00088      T_SL = 287,
00089      T_INSTANCEOF = 288,
00090      T_UNSET_CAST = 289,
00091      T_BOOL_CAST = 290,
00092      T_OBJECT_CAST = 291,
00093      T_ARRAY_CAST = 292,
00094      T_STRING_CAST = 293,
00095      T_DOUBLE_CAST = 294,
00096      T_INT_CAST = 295,
00097      T_DEC = 296,
00098      T_INC = 297,
00099      T_CLONE = 298,
00100      T_NEW = 299,
00101      T_EXIT = 300,
00102      T_IF = 301,
00103      T_ELSEIF = 302,
00104      T_ELSE = 303,
00105      T_ENDIF = 304,
00106      T_LNUMBER = 305,
00107      T_DNUMBER = 306,
00108      T_STRING = 307,
00109      T_STRING_VARNAME = 308,
00110      T_VARIABLE = 309,
00111      T_NUM_STRING = 310,
00112      T_INLINE_HTML = 311,
00113      T_CHARACTER = 312,
00114      T_BAD_CHARACTER = 313,
00115      T_ENCAPSED_AND_WHITESPACE = 314,
00116      T_CONSTANT_ENCAPSED_STRING = 315,
00117      T_ECHO = 316,
00118      T_DO = 317,
00119      T_WHILE = 318,
00120      T_ENDWHILE = 319,
00121      T_FOR = 320,
00122      T_ENDFOR = 321,
00123      T_FOREACH = 322,
00124      T_ENDFOREACH = 323,
00125      T_DECLARE = 324,
00126      T_ENDDECLARE = 325,
00127      T_AS = 326,
00128      T_SWITCH = 327,
00129      T_ENDSWITCH = 328,
00130      T_CASE = 329,
00131      T_DEFAULT = 330,
00132      T_BREAK = 331,
00133      T_CONTINUE = 332,
00134      T_FUNCTION = 333,
00135      T_CONST = 334,
00136      T_RETURN = 335,
00137      T_TRY = 336,
00138      T_CATCH = 337,
00139      T_THROW = 338,
00140      T_USE = 339,
00141      T_GLOBAL = 340,
00142      T_PUBLIC = 341,
00143      T_PROTECTED = 342,
00144      T_PRIVATE = 343,
00145      T_FINAL = 344,
00146      T_ABSTRACT = 345,
00147      T_STATIC = 346,
00148      T_VAR = 347,
00149      T_UNSET = 348,
00150      T_ISSET = 349,
00151      T_EMPTY = 350,
00152      T_HALT_COMPILER = 351,
00153      T_CLASS = 352,
00154      T_INTERFACE = 353,
00155      T_EXTENDS = 354,
00156      T_IMPLEMENTS = 355,
00157      T_OBJECT_OPERATOR = 356,
00158      T_DOUBLE_ARROW = 357,
00159      T_LIST = 358,
00160      T_ARRAY = 359,
00161      T_CLASS_C = 360,
00162      T_METHOD_C = 361,
00163      T_FUNC_C = 362,
00164      T_LINE = 363,
00165      T_FILE = 364,
00166      T_COMMENT = 365,
00167      T_DOC_COMMENT = 366,
00168      T_OPEN_TAG = 367,
00169      T_OPEN_TAG_WITH_ECHO = 368,
00170      T_CLOSE_TAG = 369,
00171      T_WHITESPACE = 370,
00172      T_START_HEREDOC = 371,
00173      T_END_HEREDOC = 372,
00174      T_DOLLAR_OPEN_CURLY_BRACES = 373,
00175      T_CURLY_OPEN = 374,
00176      T_PAAMAYIM_NEKUDOTAYIM = 375,
00177      T_ASPECT = 376,
00178      T_BEFORE = 377,
00179      T_AROUND = 378,
00180      T_AFTER = 379,
00181      T_POINTCUT = 380,
00182      T_EXEC = 381,
00183      T_CALL = 382,
00184      T_SET = 383,
00185      T_GET = 384,
00186      T_THIS = 385,
00187      T_WITHIN = 386
00188    };


Function Documentation

static void generate_xml_output ( char **  yyxsp,
char **  yyxs 
) [static]

Generating the XML document

Definition at line 2851 of file php_parser.c.

References _xml_output.

02852 {
02853 #ifndef YYYAXX_XML 
02854 #define YYYAXX_XML  "yaxx.xml"
02855 #endif
02856 #ifndef YYYAXX_DTD
02857 #define YYYAXX_DTD "yaxx.dtd"
02858 #endif
02859        int r, i, j;
02860        char buf[65536];
02861        int old_rule = 0;
02862        char *p = *yyxsp + 6;
02863 #if 0
02864        char *v = strsep(&p, ">");
02865        strcpy(buf, v);
02866 #else
02867        i = 0;
02868        while (p[i]!='>') {
02869         buf[i] = p[i];
02870         i++;
02871        }
02872        buf[i]  = 0;
02873 #endif
02874     /// Generating the XML document 
02875     char out[strlen(yyxs[1]+i+6)+strlen(buf)+69];
02876     sprintf(out, "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<php:start xmlns:php=\"http://php.net/xsl\"%s\n", yyxs[1]+i+6);
02877     _xml_output = out;
02878 }

int getLineno (  ) 

Definition at line 2874 of file php_lexer.c.

02874                {
02875     return yylineno;
02876 }

static void replace_entity ( char  c,
char *  s 
) [static]

replace a special character in the text into an entity

Definition at line 2768 of file php_parser.c.

References YYSTACK_ALLOC, and YYSTACK_FREE.

02769 {
02770     char *buf;
02771     char *i;
02772     int len, l;
02773     i = yytext_buf;
02774     do {
02775         i =  (char *)index(i, c);
02776         if (i) {
02777             l = i - yytext_buf;
02778             len = strlen(yytext_buf) + strlen(s) - 1;
02779             //buf = (char*)YYSTACK_ALLOC(1000000);
02780             buf = (char*)YYSTACK_ALLOC(len + 1); // Myo M Thein
02781             if (l>0) {
02782 #if 1 // Myo M Thein
02783         strncpy(buf, yytext_buf, l);
02784 #else
02785         int t = 0;
02786         while (t < l) {
02787             buf[t] = yytext_buf[t]; 
02788             t++;
02789         }
02790                 buf[t] = 0;
02791 #endif
02792             } else {
02793                 buf[0] = 0;
02794             }
02795             strcat(buf, s); 
02796             strncat(buf, yytext_buf + l + 1, strlen(yytext_buf) - l); 
02797             buf[len] = 0;
02798             YYSTACK_FREE(yytext_buf); 
02799             //yytext_buf = buf;
02800         memcpy(yytext_buf,buf,len+1);
02801         i++;
02802         if (*i=='\0')
02803             i=NULL;
02804         }
02805     } while (i);
02806 }

static void replace_special_entities ( char *  text,
char *  text_out 
) [static]

Definition at line 2839 of file php_parser.c.

References xml_encode().

02840 {
02841   int i,lg;
02842     if (!text) { strcpy(text_out,"??");return ; }
02843     lg = strlen(text);
02844     strcpy(text_out,"");
02845     for (i=0;i<lg;i++)
02846     {
02847        strcat(text_out,xml_encode(text[i]));
02848     }
02849 }

Here is the call graph for this function:

static char* xml_encode ( char  ch  )  [static]

replace the special characters in the text into entities

Definition at line 2810 of file php_parser.c.

Referenced by replace_special_entities().

02811 {
02812   static char text[2];
02813     switch(ch)
02814     {
02815     case '&':
02816         return ( "&amp;");
02817         break;
02818     case '>':
02819         return ( "&gt;");
02820         break;
02821     case '<' :
02822         return ( "&lt;" );
02823         break;
02824     case  '\"':
02825         return ( "&quot;");
02826         break;
02827     case '\'':
02828         return ( "&apos;");
02829         break;
02830     default:
02831         text[0]=ch;
02832         text[1]=0;
02833         return text;
02834         break;
02835     }
02836 }

Here is the caller graph for this function:

static void yydestruct ( char *  yymsg,
int  yytype,
char* *  yyvaluep 
) const [static]

Definition at line 2700 of file php_parser.c.

References YY_SYMBOL_PRINT, and yylocationp().

02705 {
02706   /* Pacify ``unused variable'' warnings.  */
02707   (void) yyvaluep;
02708 
02709   if (!yymsg)
02710     yymsg = "Deleting";
02711   YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
02712 
02713   switch (yytype)
02714     {
02715 
02716       default:
02717         break;
02718     }
02719 }

Here is the call graph for this function:

void yyerror ( char *  s  ) 

int yylex (  ) 

int yylocationp (  ) 

Referenced by yydestruct().

Here is the caller graph for this function:

int yyparse (  ) 

Referenced by main().

Here is the caller graph for this function:

static char* yystpcpy ( char *  yydest,
const char *  yysrc 
) [static]

Definition at line 2585 of file php_parser.c.

Referenced by yytnamerr().

02589 {
02590   char *yyd = yydest;
02591   const char *yys = yysrc;
02592 
02593   while ((*yyd++ = *yys++) != '\0')
02594     continue;
02595 
02596   return yyd - 1;
02597 }

Here is the caller graph for this function:

static unsigned int yystrlen ( char *  yystr  )  const [static]

Definition at line 2561 of file php_parser.c.

Referenced by yytnamerr().

02564 {
02565   const char *yys = yystr;
02566 
02567   while (*yys++ != '\0')
02568     continue;
02569 
02570   return yys - yystr - 1;
02571 }

Here is the caller graph for this function:

static char* YYTNAME ( int  r  )  [static]

replace character terminals into symbolic terminals

Definition at line 2746 of file php_parser.c.

References yytname.

02747 {
02748   static char yytname_buf[8];
02749   if (strlen(yytname[r])==3 && yytname[r][0] == '\'' && yytname[r][2] == '\'') 
02750   { 
02751         sprintf(yytname_buf, "CHAR%d", (int)yytname[r][1]);
02752         return yytname_buf;
02753   } 
02754   else if (strlen(yytname[r])>=2 && yytname[r][0] == 64 )
02755   {
02756     strcpy(yytname_buf,"ACTION");
02757     strcat(yytname_buf,&(yytname[r][1]));
02758     return yytname_buf;
02759   }
02760 
02761   return (char *)yytname[r];
02762 }

static unsigned int yytnamerr ( char *  yyres,
const char *  yystr 
) [static]

Definition at line 2610 of file php_parser.c.

References YYSIZE_T, yystpcpy(), and yystrlen().

02611 {
02612   if (*yystr == '"')
02613     {
02614       YYSIZE_T yyn = 0;
02615       char const *yyp = yystr;
02616 
02617       for (;;)
02618     switch (*++yyp)
02619       {
02620       case '\'':
02621       case ',':
02622         goto do_not_strip_quotes;
02623 
02624       case '\\':
02625         if (*++yyp != '\\')
02626           goto do_not_strip_quotes;
02627         /* Fall through.  */
02628       default:
02629         if (yyres)
02630           yyres[yyn] = *yyp;
02631         yyn++;
02632         break;
02633 
02634       case '"':
02635         if (yyres)
02636           yyres[yyn] = '\0';
02637         return yyn;
02638       }
02639     do_not_strip_quotes: ;
02640     }
02641 
02642   if (! yyres)
02643     return yystrlen (yystr);
02644 
02645   return yystpcpy (yyres, yystr) - yyres;
02646 }

Here is the call graph for this function:

int yywrap (  ) 


Variable Documentation

int _error = 0

Definition at line 366 of file php_parser.c.

Referenced by main().

char* _xml_output

Definition at line 365 of file php_parser.c.

Referenced by generate_xml_output(), and main().

char* file_name

Definition at line 364 of file php_parser.c.

const short int yycheck[] [static]

Definition at line 1807 of file php_parser.c.

const unsigned short int yydefact[] [static]

Definition at line 1112 of file php_parser.c.

const short int yydefgoto[] [static]

Initial value:

{
      -1,     1,     2,     4,    76,   177,   303,   418,   842,    78,
     450,   600,   527,   671,   247,   533,   140,   532,   456,   675,
     840,   463,   378,   537,   799,   377,   536,   798,   144,   155,
     692,   808,   905,   934,   937,   938,   939,   945,   948,   640,
     274,   159,    79,    80,   258,    81,   150,   464,    82,   425,
     310,   416,   501,   641,   718,   719,   890,   862,   577,   502,
     567,   568,   569,   639,    83,   309,    84,   427,   511,   512,
     677,   609,   879,   843,   542,   380,   545,   614,   845,   802,
     752,   605,   672,   901,   736,   925,   739,   793,   619,   620,
     621,   368,   369,   162,   163,   167,   588,   658,   579,   898,
     659,   660,   506,   507,   650,   508,   138,   248,   249,   457,
      85,   280,   592,   237,   319,   320,   315,   317,   318,   591,
     113,    86,   243,   515,   516,   354,    87,   129,   130,   364,
     526,   598,   670,   135,   363,    88,   392,   393,    89,   550,
     410,   551,    90,    91,   405,   478,    92,   226,    93,   355,
     522,   666,   734,   835,   595,   665,    94,    95,    96,    97,
      98,    99,   357,   442,   521,   443,   444,   100,   403,   404,
     554,   283,   284,   174,   299,   483,   563,   101,   277,   474,
     102
}

Definition at line 1213 of file php_parser.c.

const short int yypact[] [static]

Definition at line 1239 of file php_parser.c.

const short int yypgoto[] [static]

Initial value:

{
    -819,  -819,  -819,  -819,  -819,  -249,  -819,  -819,     0,  -819,
    -819,  -819,  -819,  -819,  -819,  -819,  -819,  -819,  -819,  -819,
    -819,  -819,  -819,  -819,  -819,  -819,  -819,  -819,  -819,  -819,
    -819,  -819,  -819,  -819,  -819,  -819,   -38,  -819,  -819,   735,
     514,  -819,   602,   603,  -566,  -819,  -819,  -819,  -819,  -819,
    -819,  -819,  -819,   335,  -103,  -819,  -818,  -493,  -819,  -819,
    -497,  -592,  -517,   -13,  -819,  -819,  -819,  -819,  -819,   400,
     304,   240,  -819,   115,  -819,  -819,  -819,  -222,  -819,  -819,
     166,  -819,  -819,  -819,  -819,  -819,  -819,  -819,  -719,  -819,
     241,  -345,  -819,  -819,   667,  -819,   350,   521,  -819,    29,
     531,  -408,   176,  -500,  -819,  -819,  -819,  -422,  -819,  -819,
       7,  -819,  -819,  -819,  -819,  -819,  -819,  -819,  -819,  -819,
    -819,  -819,  -819,  -819,  -819,  -819,   -23,  -191,  -819,  -819,
    -819,  -819,  -819,  -819,   360,   -71,    14,  -819,  -819,  -819,
     394,  -819,    19,   795,  -356,  -819,   388,  -819,   162,  -819,
    -819,  -819,  -819,  -819,   119,  -819,  -161,  -819,  -819,   -21,
      -6,  -819,   435,  -362,  -819,  -819,  -819,    -4,   405,   486,
    -819,  -819,  -819,   452,  -819,  -819,  -819,  -819,  -819,  -819,
    -819
}

Definition at line 1340 of file php_parser.c.

const unsigned short int yyprhs[] [static]

Definition at line 620 of file php_parser.c.

const unsigned short int yyr1[] [static]

Definition at line 1004 of file php_parser.c.

const unsigned char yyr2[] [static]

Definition at line 1057 of file php_parser.c.

const short int yyrhs[] [static]

Definition at line 673 of file php_parser.c.

const unsigned short int yyrline[] [static]

Definition at line 837 of file php_parser.c.

const unsigned short int yystos[] [static]

Definition at line 2248 of file php_parser.c.

const short int yytable[] [static]

Definition at line 1368 of file php_parser.c.

char* yytext = NULL

Definition at line 2886 of file php_parser.c.

char* yytext_buf = NULL [static]

Definition at line 2764 of file php_parser.c.

const char* const yytname[] [static]

Definition at line 893 of file php_parser.c.

Referenced by YYTNAME().

const unsigned char yytranslate[] [static]

Definition at line 574 of file php_parser.c.


Generated on Wed Feb 27 20:31:13 2008 for php.ast.svn.src. by  doxygen 1.5.3