1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-11-25 08:12:40 +01:00

Revert xhpast changes that impacted builds under Bison 2.3

Summary:
Fixes T9753. Changes some time ago (in D13970 + D13974) improved XHPAST build compile-time warning behavior under Bison 3.

However, macOS still ships with Bison 2.3 and these changes prevent XHPAST from building with Bison 2.3. The changes didn't introduce version detection, so Bison 2.3 builds fail somewhat mysteriously without obvious next steps.

It's relatively easy to install Bison 3 on macOS via Homebrew, but the Bison 3 changes aren't terribly substantive and XHPAST doesn't actually depend on any Bison 3 features, so just return to Bison 2.3 for now.

It would be reasonable to undo this again and retarget Bison 3 in the future, but ideally we should wait until macOS ships with Bison 3 or we have a specific reason to bump the minimum required version to 3. If/when we do, we should version-detect Bison and raise a clear error message.

Test Plan: Built xhpast under Bison 2.3 on a default macOS install using "make cleanall && make install".

Maniphest Tasks: T9753

Differential Revision: https://secure.phabricator.com/D21063
This commit is contained in:
epriestley 2020-04-07 09:47:35 -07:00
parent 33dc2fe819
commit 763ac445dc
7 changed files with 5676 additions and 6093 deletions

View file

@ -38,7 +38,7 @@
"text": {
"type": "text",
"exclude": [
"(^src/(.*/)?__tests__/[^/]+/.*\\.(txt|json|expect))"
"(^src/(.*/)?__tests__/[^/]+/.*\\.(txt|json|expect)|/Makefile\\z)"
]
},
"text-without-length": {
@ -50,6 +50,15 @@
"3": "disabled"
}
},
"text-without-tabs": {
"type": "text",
"include": [
"(/Makefile\\z)"
],
"severity": {
"2": "disabled"
}
},
"xhpast": {
"type": "xhpast",
"include": "(\\.php$)",

View file

@ -1,4 +1,4 @@
BISONFLAGS = --verbose -Wall
BISONFLAGS = --verbose --name-prefix xhpast
CPPFLAGS = -fPIC -Wall
FLEXFLAGS = -CFr

View file

@ -57,22 +57,19 @@ static void yyerror(void* yyscanner, void* _, const char* error) {
%expect 5
// 2: PHP's if/else grammar
// 7: expr '[' dim_offset ']' -- shift will default to first grammar
%name-prefix "xhpast"
%pure-parser
%parse-param { void* yyscanner }
%parse-param { xhpast::Node** root }
%lex-param { void* yyscanner }
%error-verbose
%precedence T_INCLUDE T_INCLUDE_ONCE
%token T_EVAL
%precedence T_REQUIRE T_REQUIRE_ONCE
%token ','
%left T_INCLUDE T_INCLUDE_ONCE T_EVAL T_REQUIRE T_REQUIRE_ONCE
%left ','
%left T_LOGICAL_OR
%left T_LOGICAL_XOR
%left T_LOGICAL_AND
%precedence T_PRINT
%precedence '=' T_PLUS_EQUAL
%right T_PRINT
%left '=' T_PLUS_EQUAL
T_MINUS_EQUAL
T_MUL_EQUAL
T_DIV_EQUAL
@ -96,22 +93,27 @@ static void yyerror(void* yyscanner, void* _, const char* error) {
%left T_SL T_SR
%left '+' '-' '.'
%left '*' '/' '%'
%precedence '!'
%precedence T_INSTANCEOF
%precedence '~' T_INC
%token T_DEC
%precedence T_INT_CAST T_DOUBLE_CAST T_STRING_CAST
%token T_UNICODE_CAST
%token T_BINARY_CAST
%precedence T_ARRAY_CAST T_OBJECT_CAST T_BOOL_CAST T_UNSET_CAST '@'
%token '['
%token T_NEW
%precedence T_CLONE
%right '!'
%nonassoc T_INSTANCEOF
%right '~' T_INC
T_DEC
T_INT_CAST
T_DOUBLE_CAST
T_STRING_CAST
T_UNICODE_CAST
T_BINARY_CAST
T_ARRAY_CAST
T_OBJECT_CAST
T_BOOL_CAST
T_UNSET_CAST
'@'
%right '['
%nonassoc T_NEW T_CLONE
%token T_EXIT
%token T_IF
%token T_ELSEIF
%token T_ELSE
%token T_ENDIF
%left T_ELSEIF
%left T_ELSE
%left T_ENDIF
%token T_LNUMBER
%token T_DNUMBER
@ -152,12 +154,7 @@ static void yyerror(void* yyscanner, void* _, const char* error) {
%token T_THROW
%token T_USE
%token T_GLOBAL
%token T_STATIC
%token T_ABSTRACT
%token T_FINAL
%token T_PRIVATE
%token T_PROTECTED
%token T_PUBLIC
%right T_STATIC T_ABSTRACT T_FINAL T_PRIVATE T_PROTECTED T_PUBLIC
%token T_VAR
%token T_UNSET
%token T_ISSET
@ -216,7 +213,7 @@ top_statement_list:
top_statement_list top_statement {
$$ = $1->appendChild($2);
}
| %empty {
| /* empty */ {
$$ = NNEW(n_STATEMENT_LIST);
}
;
@ -329,7 +326,7 @@ inner_statement_list:
inner_statement_list inner_statement {
$$ = $1->appendChild($2);
}
| %empty {
| /* empty */ {
$$ = NNEW(n_STATEMENT_LIST);
}
;
@ -638,7 +635,7 @@ catch:
;
finally_statement:
%empty {
/* empty */ {
$$ = NNEW(n_EMPTY);
}
| non_empty_finally_statement
@ -677,7 +674,7 @@ class_declaration_statement:
;
is_reference:
%empty {
/* empty */ {
$$ = NNEW(n_EMPTY);
}
| '&' {
@ -754,7 +751,7 @@ class_entry_type:
;
extends_from:
%empty {
/* empty */ {
$$ = NNEW(n_EMPTY);
}
| T_EXTENDS fully_qualified_class_name {
@ -767,7 +764,7 @@ interface_entry:
;
interface_extends_list:
%empty {
/* empty */ {
$$ = NNEW(n_EMPTY);
}
| T_EXTENDS interface_list {
@ -778,7 +775,7 @@ interface_extends_list:
;
implements_list:
%empty {
/* empty */ {
$$ = NNEW(n_EMPTY);
}
| T_IMPLEMENTS interface_list {
@ -798,7 +795,7 @@ interface_list:
;
foreach_optional_arg:
%empty {
/* empty */ {
$$ = NNEW(n_EMPTY);
}
| T_DOUBLE_ARROW foreach_variable {
@ -890,7 +887,7 @@ switch_case_list:
;
case_list:
%empty {
/* empty */ {
$$ = NNEW(n_STATEMENT_LIST);
}
| case_list T_CASE expr case_separator inner_statement_list {
@ -925,7 +922,7 @@ while_statement:
;
elseif_list:
%empty {
/* empty */ {
$$ = NNEW(n_CONDITION_LIST);
}
| elseif_list T_ELSEIF '(' expr ')' statement {
@ -938,7 +935,7 @@ elseif_list:
;
new_elseif_list:
%empty {
/* empty */ {
$$ = NNEW(n_CONDITION_LIST);
}
| new_elseif_list T_ELSEIF '(' expr ')' ':' inner_statement_list {
@ -951,7 +948,7 @@ new_elseif_list:
;
else_single:
%empty {
/* empty */ {
$$ = NNEW(n_EMPTY);
}
| T_ELSE statement {
@ -962,7 +959,7 @@ else_single:
;
new_else_single:
%empty {
/* empty */ {
$$ = NNEW(n_EMPTY);
}
| T_ELSE ':' inner_statement_list {
@ -974,7 +971,7 @@ new_else_single:
parameter_list:
non_empty_parameter_list
| %empty {
| /* empty */ {
$$ = NNEW(n_DECLARATION_PARAMETER_LIST);
}
;
@ -1063,7 +1060,7 @@ parameter:
;
optional_type:
%empty {
/* empty */ {
$$ = NNEW(n_EMPTY);
}
| type
@ -1086,7 +1083,7 @@ type:
;
return_type:
%empty {
/* empty */ {
$$ = NNEW(n_EMPTY);
}
| ':' optional_type {
@ -1097,7 +1094,7 @@ return_type:
function_call_parameter_list:
non_empty_function_call_parameter_list
| %empty {
| /* empty */ {
$$ = NNEW(n_CALL_PARAMETER_LIST);
}
;
@ -1186,7 +1183,7 @@ class_statement_list:
class_statement_list class_statement {
$$ = $1->appendChild($2);
}
| %empty {
| /* empty */ {
$$ = NNEW(n_STATEMENT_LIST);
}
;
@ -1251,7 +1248,7 @@ trait_adaptations:
;
trait_adaptation_list:
%empty {
/* empty */ {
$$ = NNEW(n_TRAIT_ADAPTATION_LIST);
}
| non_empty_trait_adaptation_list {
@ -1332,7 +1329,7 @@ trait_alias:
;
trait_modifiers:
%empty {
/* empty */ {
$$ = NNEW(n_EMPTY);
}
| member_modifier {
@ -1360,7 +1357,7 @@ variable_modifiers:
;
method_modifiers:
%empty {
/* empty */ {
$$ = NNEW(n_METHOD_MODIFIER_LIST);
}
| non_empty_member_modifiers {
@ -1451,7 +1448,7 @@ echo_expr_list:
;
for_expr:
%empty {
/* empty */ {
$$ = NNEW(n_EMPTY);
}
| non_empty_for_expr
@ -1952,7 +1949,7 @@ function:
;
lexical_vars:
%empty {
/* empty */ {
$$ = NNEW(n_EMPTY);
}
| T_USE '(' lexical_var_list ')' {
@ -2104,7 +2101,7 @@ dynamic_class_name_variable_properties:
dynamic_class_name_variable_properties dynamic_class_name_variable_property {
$$ = $1->appendChild($2);
}
| %empty {
| /* empty */ {
$$ = NNEW(n_EMPTY);
}
;
@ -2116,7 +2113,7 @@ dynamic_class_name_variable_property:
;
exit_expr:
%empty {
/* empty */ {
$$ = NNEW(n_EMPTY);
}
| '(' ')' {
@ -2131,7 +2128,7 @@ exit_expr:
;
ctor_arguments:
%empty {
/* empty */ {
$$ = NNEW(n_EMPTY);
}
| '(' function_call_parameter_list ')' {
@ -2234,7 +2231,7 @@ scalar:
;
static_array_pair_list:
%empty {
/* empty */ {
$$ = NNEW(n_ARRAY_VALUE_LIST);
}
| non_empty_static_array_pair_list possible_comma {
@ -2243,7 +2240,7 @@ static_array_pair_list:
;
possible_comma:
%empty {
/* empty */ {
$$ = NNEW(n_EMPTY);
}
| ','
@ -2335,7 +2332,7 @@ variable_properties:
variable_properties variable_property {
$$ = $1->appendChildren($2);
}
| %empty {
| /* empty */ {
$$ = NNEW(n_EMPTY);
}
;
@ -2374,7 +2371,7 @@ method:
method_or_not:
method
| array_method_dereference
| %empty {
| /* empty */ {
$$ = NNEW(n_EMPTY);
}
;
@ -2481,7 +2478,7 @@ compound_variable:
;
dim_offset:
%empty {
/* empty */ {
$$ = NNEW(n_EMPTY);
}
| expr {
@ -2554,13 +2551,13 @@ assignment_list_element:
$$ = NNEW(n_LIST);
$$->appendChild(NEXPAND($2, $3, $4));
}
| %empty {
| /* empty */ {
$$ = NNEW(n_EMPTY);
}
;
array_pair_list:
%empty {
/* empty */ {
$$ = NNEW(n_ARRAY_VALUE_LIST);
}
| non_empty_array_pair_list possible_comma {

File diff suppressed because it is too large Load diff

View file

@ -1,13 +1,14 @@
/* A Bison parser, made by GNU Bison 3.0.4. */
/* A Bison parser, made by GNU Bison 2.3. */
/* Bison interface for Yacc-like parsers in C
/* Skeleton interface for Bison's Yacc-like parsers in C
Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc.
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@ -15,7 +16,9 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. */
/* As a special exception, you may create a larger work that contains
part or all of the Bison parser skeleton and distribute that work
@ -30,67 +33,58 @@
This special exception was added by the Free Software Foundation in
version 2.2 of Bison. */
#ifndef YY_XHPAST_PARSER_YACC_HPP_INCLUDED
# define YY_XHPAST_PARSER_YACC_HPP_INCLUDED
/* Debug traces. */
#ifndef YYDEBUG
# define YYDEBUG 0
#endif
#if YYDEBUG
extern int xhpastdebug;
#endif
/* Token type. */
/* Tokens. */
#ifndef YYTOKENTYPE
# define YYTOKENTYPE
enum yytokentype
{
T_INCLUDE = 258,
T_INCLUDE_ONCE = 259,
/* Put the tokens into the symbol table, so that GDB and other debuggers
know about them. */
enum yytokentype {
T_REQUIRE_ONCE = 258,
T_REQUIRE = 259,
T_EVAL = 260,
T_REQUIRE = 261,
T_REQUIRE_ONCE = 262,
T_INCLUDE_ONCE = 261,
T_INCLUDE = 262,
T_LOGICAL_OR = 263,
T_LOGICAL_XOR = 264,
T_LOGICAL_AND = 265,
T_PRINT = 266,
T_PLUS_EQUAL = 267,
T_MINUS_EQUAL = 268,
T_MUL_EQUAL = 269,
T_DIV_EQUAL = 270,
T_CONCAT_EQUAL = 271,
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_AND_EQUAL = 273,
T_OR_EQUAL = 274,
T_XOR_EQUAL = 275,
T_SL_EQUAL = 276,
T_SR_EQUAL = 277,
T_CONCAT_EQUAL = 273,
T_DIV_EQUAL = 274,
T_MUL_EQUAL = 275,
T_MINUS_EQUAL = 276,
T_PLUS_EQUAL = 277,
T_COALESCE = 278,
T_BOOLEAN_OR = 279,
T_BOOLEAN_AND = 280,
T_IS_EQUAL = 281,
T_IS_NOT_EQUAL = 282,
T_SPACESHIP = 281,
T_IS_NOT_IDENTICAL = 282,
T_IS_IDENTICAL = 283,
T_IS_NOT_IDENTICAL = 284,
T_SPACESHIP = 285,
T_IS_SMALLER_OR_EQUAL = 286,
T_IS_GREATER_OR_EQUAL = 287,
T_SL = 288,
T_SR = 289,
T_IS_NOT_EQUAL = 284,
T_IS_EQUAL = 285,
T_IS_GREATER_OR_EQUAL = 286,
T_IS_SMALLER_OR_EQUAL = 287,
T_SR = 288,
T_SL = 289,
T_INSTANCEOF = 290,
T_INC = 291,
T_DEC = 292,
T_INT_CAST = 293,
T_DOUBLE_CAST = 294,
T_STRING_CAST = 295,
T_UNSET_CAST = 291,
T_BOOL_CAST = 292,
T_OBJECT_CAST = 293,
T_ARRAY_CAST = 294,
T_BINARY_CAST = 295,
T_UNICODE_CAST = 296,
T_BINARY_CAST = 297,
T_ARRAY_CAST = 298,
T_OBJECT_CAST = 299,
T_BOOL_CAST = 300,
T_UNSET_CAST = 301,
T_NEW = 302,
T_CLONE = 303,
T_STRING_CAST = 297,
T_DOUBLE_CAST = 298,
T_INT_CAST = 299,
T_DEC = 300,
T_INC = 301,
T_CLONE = 302,
T_NEW = 303,
T_EXIT = 304,
T_IF = 305,
T_ELSEIF = 306,
@ -134,12 +128,12 @@ extern int xhpastdebug;
T_THROW = 344,
T_USE = 345,
T_GLOBAL = 346,
T_STATIC = 347,
T_ABSTRACT = 348,
T_FINAL = 349,
T_PRIVATE = 350,
T_PROTECTED = 351,
T_PUBLIC = 352,
T_PUBLIC = 347,
T_PROTECTED = 348,
T_PRIVATE = 349,
T_FINAL = 350,
T_ABSTRACT = 351,
T_STATIC = 352,
T_VAR = 353,
T_UNSET = 354,
T_ISSET = 355,
@ -186,17 +180,157 @@ extern int xhpastdebug;
T_ELLIPSIS = 396
};
#endif
/* Tokens. */
#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_COALESCE 278
#define T_BOOLEAN_OR 279
#define T_BOOLEAN_AND 280
#define T_SPACESHIP 281
#define T_IS_NOT_IDENTICAL 282
#define T_IS_IDENTICAL 283
#define T_IS_NOT_EQUAL 284
#define T_IS_EQUAL 285
#define T_IS_GREATER_OR_EQUAL 286
#define T_IS_SMALLER_OR_EQUAL 287
#define T_SR 288
#define T_SL 289
#define T_INSTANCEOF 290
#define T_UNSET_CAST 291
#define T_BOOL_CAST 292
#define T_OBJECT_CAST 293
#define T_ARRAY_CAST 294
#define T_BINARY_CAST 295
#define T_UNICODE_CAST 296
#define T_STRING_CAST 297
#define T_DOUBLE_CAST 298
#define T_INT_CAST 299
#define T_DEC 300
#define T_INC 301
#define T_CLONE 302
#define T_NEW 303
#define T_EXIT 304
#define T_IF 305
#define T_ELSEIF 306
#define T_ELSE 307
#define T_ENDIF 308
#define T_LNUMBER 309
#define T_DNUMBER 310
#define T_STRING 311
#define T_STRING_VARNAME 312
#define T_VARIABLE 313
#define T_NUM_STRING 314
#define T_INLINE_HTML 315
#define T_CHARACTER 316
#define T_BAD_CHARACTER 317
#define T_ENCAPSED_AND_WHITESPACE 318
#define T_CONSTANT_ENCAPSED_STRING 319
#define T_BACKTICKS_EXPR 320
#define T_ECHO 321
#define T_DO 322
#define T_WHILE 323
#define T_ENDWHILE 324
#define T_FOR 325
#define T_ENDFOR 326
#define T_FOREACH 327
#define T_ENDFOREACH 328
#define T_DECLARE 329
#define T_ENDDECLARE 330
#define T_AS 331
#define T_SWITCH 332
#define T_ENDSWITCH 333
#define T_CASE 334
#define T_DEFAULT 335
#define T_BREAK 336
#define T_CONTINUE 337
#define T_GOTO 338
#define T_FUNCTION 339
#define T_CONST 340
#define T_RETURN 341
#define T_TRY 342
#define T_CATCH 343
#define T_THROW 344
#define T_USE 345
#define T_GLOBAL 346
#define T_PUBLIC 347
#define T_PROTECTED 348
#define T_PRIVATE 349
#define T_FINAL 350
#define T_ABSTRACT 351
#define T_STATIC 352
#define T_VAR 353
#define T_UNSET 354
#define T_ISSET 355
#define T_EMPTY 356
#define T_HALT_COMPILER 357
#define T_CLASS 358
#define T_INTERFACE 359
#define T_EXTENDS 360
#define T_IMPLEMENTS 361
#define T_OBJECT_OPERATOR 362
#define T_DOUBLE_ARROW 363
#define T_LIST 364
#define T_ARRAY 365
#define T_CLASS_C 366
#define T_METHOD_C 367
#define T_FUNC_C 368
#define T_LINE 369
#define T_FILE 370
#define T_COMMENT 371
#define T_DOC_COMMENT 372
#define T_OPEN_TAG 373
#define T_OPEN_TAG_WITH_ECHO 374
#define T_OPEN_TAG_FAKE 375
#define T_CLOSE_TAG 376
#define T_WHITESPACE 377
#define T_START_HEREDOC 378
#define T_END_HEREDOC 379
#define T_HEREDOC 380
#define T_DOLLAR_OPEN_CURLY_BRACES 381
#define T_CURLY_OPEN 382
#define T_PAAMAYIM_NEKUDOTAYIM 383
#define T_BINARY_DOUBLE 384
#define T_BINARY_HEREDOC 385
#define T_NAMESPACE 386
#define T_NS_C 387
#define T_DIR 388
#define T_NS_SEPARATOR 389
#define T_INSTEADOF 390
#define T_CALLABLE 391
#define T_TRAIT 392
#define T_TRAIT_C 393
#define T_YIELD 394
#define T_FINALLY 395
#define T_ELLIPSIS 396
/* Value type. */
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef int YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
# define YYSTYPE_IS_TRIVIAL 1
#endif
int xhpastparse (void* yyscanner, xhpast::Node** root);
#endif /* !YY_XHPAST_PARSER_YACC_HPP_INCLUDED */
/* @generated */

File diff suppressed because it is too large Load diff

View file

@ -12,234 +12,12 @@
#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
#define YY_FLEX_MINOR_VERSION 6
#define YY_FLEX_SUBMINOR_VERSION 4
#define YY_FLEX_MINOR_VERSION 5
#define YY_FLEX_SUBMINOR_VERSION 35
#if YY_FLEX_SUBMINOR_VERSION > 0
#define FLEX_BETA
#endif
#ifdef yy_create_buffer
#define xhpast_create_buffer_ALREADY_DEFINED
#else
#define yy_create_buffer xhpast_create_buffer
#endif
#ifdef yy_delete_buffer
#define xhpast_delete_buffer_ALREADY_DEFINED
#else
#define yy_delete_buffer xhpast_delete_buffer
#endif
#ifdef yy_scan_buffer
#define xhpast_scan_buffer_ALREADY_DEFINED
#else
#define yy_scan_buffer xhpast_scan_buffer
#endif
#ifdef yy_scan_string
#define xhpast_scan_string_ALREADY_DEFINED
#else
#define yy_scan_string xhpast_scan_string
#endif
#ifdef yy_scan_bytes
#define xhpast_scan_bytes_ALREADY_DEFINED
#else
#define yy_scan_bytes xhpast_scan_bytes
#endif
#ifdef yy_init_buffer
#define xhpast_init_buffer_ALREADY_DEFINED
#else
#define yy_init_buffer xhpast_init_buffer
#endif
#ifdef yy_flush_buffer
#define xhpast_flush_buffer_ALREADY_DEFINED
#else
#define yy_flush_buffer xhpast_flush_buffer
#endif
#ifdef yy_load_buffer_state
#define xhpast_load_buffer_state_ALREADY_DEFINED
#else
#define yy_load_buffer_state xhpast_load_buffer_state
#endif
#ifdef yy_switch_to_buffer
#define xhpast_switch_to_buffer_ALREADY_DEFINED
#else
#define yy_switch_to_buffer xhpast_switch_to_buffer
#endif
#ifdef yypush_buffer_state
#define xhpastpush_buffer_state_ALREADY_DEFINED
#else
#define yypush_buffer_state xhpastpush_buffer_state
#endif
#ifdef yypop_buffer_state
#define xhpastpop_buffer_state_ALREADY_DEFINED
#else
#define yypop_buffer_state xhpastpop_buffer_state
#endif
#ifdef yyensure_buffer_stack
#define xhpastensure_buffer_stack_ALREADY_DEFINED
#else
#define yyensure_buffer_stack xhpastensure_buffer_stack
#endif
#ifdef yylex
#define xhpastlex_ALREADY_DEFINED
#else
#define yylex xhpastlex
#endif
#ifdef yyrestart
#define xhpastrestart_ALREADY_DEFINED
#else
#define yyrestart xhpastrestart
#endif
#ifdef yylex_init
#define xhpastlex_init_ALREADY_DEFINED
#else
#define yylex_init xhpastlex_init
#endif
#ifdef yylex_init_extra
#define xhpastlex_init_extra_ALREADY_DEFINED
#else
#define yylex_init_extra xhpastlex_init_extra
#endif
#ifdef yylex_destroy
#define xhpastlex_destroy_ALREADY_DEFINED
#else
#define yylex_destroy xhpastlex_destroy
#endif
#ifdef yyget_debug
#define xhpastget_debug_ALREADY_DEFINED
#else
#define yyget_debug xhpastget_debug
#endif
#ifdef yyset_debug
#define xhpastset_debug_ALREADY_DEFINED
#else
#define yyset_debug xhpastset_debug
#endif
#ifdef yyget_extra
#define xhpastget_extra_ALREADY_DEFINED
#else
#define yyget_extra xhpastget_extra
#endif
#ifdef yyset_extra
#define xhpastset_extra_ALREADY_DEFINED
#else
#define yyset_extra xhpastset_extra
#endif
#ifdef yyget_in
#define xhpastget_in_ALREADY_DEFINED
#else
#define yyget_in xhpastget_in
#endif
#ifdef yyset_in
#define xhpastset_in_ALREADY_DEFINED
#else
#define yyset_in xhpastset_in
#endif
#ifdef yyget_out
#define xhpastget_out_ALREADY_DEFINED
#else
#define yyget_out xhpastget_out
#endif
#ifdef yyset_out
#define xhpastset_out_ALREADY_DEFINED
#else
#define yyset_out xhpastset_out
#endif
#ifdef yyget_leng
#define xhpastget_leng_ALREADY_DEFINED
#else
#define yyget_leng xhpastget_leng
#endif
#ifdef yyget_text
#define xhpastget_text_ALREADY_DEFINED
#else
#define yyget_text xhpastget_text
#endif
#ifdef yyget_lineno
#define xhpastget_lineno_ALREADY_DEFINED
#else
#define yyget_lineno xhpastget_lineno
#endif
#ifdef yyset_lineno
#define xhpastset_lineno_ALREADY_DEFINED
#else
#define yyset_lineno xhpastset_lineno
#endif
#ifdef yyget_column
#define xhpastget_column_ALREADY_DEFINED
#else
#define yyget_column xhpastget_column
#endif
#ifdef yyset_column
#define xhpastset_column_ALREADY_DEFINED
#else
#define yyset_column xhpastset_column
#endif
#ifdef yywrap
#define xhpastwrap_ALREADY_DEFINED
#else
#define yywrap xhpastwrap
#endif
#ifdef yyget_lval
#define xhpastget_lval_ALREADY_DEFINED
#else
#define yyget_lval xhpastget_lval
#endif
#ifdef yyset_lval
#define xhpastset_lval_ALREADY_DEFINED
#else
#define yyset_lval xhpastset_lval
#endif
#ifdef yyalloc
#define xhpastalloc_ALREADY_DEFINED
#else
#define yyalloc xhpastalloc
#endif
#ifdef yyrealloc
#define xhpastrealloc_ALREADY_DEFINED
#else
#define yyrealloc xhpastrealloc
#endif
#ifdef yyfree
#define xhpastfree_ALREADY_DEFINED
#else
#define yyfree xhpastfree
#endif
/* First, we deal with platform-specific or compiler-specific issues. */
/* begin standard C headers. */
@ -273,6 +51,7 @@ typedef int16_t flex_int16_t;
typedef uint16_t flex_uint16_t;
typedef int32_t flex_int32_t;
typedef uint32_t flex_uint32_t;
typedef uint64_t flex_uint64_t;
#else
typedef signed char flex_int8_t;
typedef short int flex_int16_t;
@ -280,6 +59,7 @@ typedef int flex_int32_t;
typedef unsigned char flex_uint8_t;
typedef unsigned short int flex_uint16_t;
typedef unsigned int flex_uint32_t;
#endif /* ! C99 */
/* Limits of integral types. */
#ifndef INT8_MIN
@ -310,23 +90,27 @@ typedef unsigned int flex_uint32_t;
#define UINT32_MAX (4294967295U)
#endif
#ifndef SIZE_MAX
#define SIZE_MAX (~(size_t)0)
#endif
#endif /* ! C99 */
#endif /* ! FLEXINT_H */
/* begin standard C++ headers. */
#ifdef __cplusplus
/* TODO: this is always defined, so inline it */
/* The "const" storage-class-modifier is valid. */
#define YY_USE_CONST
#else /* ! __cplusplus */
/* C99 requires __STDC__ to be defined as 1. */
#if defined (__STDC__)
#define YY_USE_CONST
#endif /* defined (__STDC__) */
#endif /* ! __cplusplus */
#ifdef YY_USE_CONST
#define yyconst const
#if defined(__GNUC__) && __GNUC__ >= 3
#define yynoreturn __attribute__((__noreturn__))
#else
#define yynoreturn
#define yyconst
#endif
/* An opaque pointer. */
@ -348,15 +132,7 @@ typedef void* yyscan_t;
/* Size of default input buffer. */
#ifndef YY_BUF_SIZE
#ifdef __ia64__
/* On IA-64, the buffer size is 16k, not 8k.
* Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
* Ditto for the __ia64__ case accordingly.
*/
#define YY_BUF_SIZE 32768
#else
#define YY_BUF_SIZE 16384
#endif /* __ia64__ */
#endif
#ifndef YY_TYPEDEF_YY_BUFFER_STATE
@ -381,12 +157,12 @@ struct yy_buffer_state
/* Size of input buffer in bytes, not including room for EOB
* characters.
*/
int yy_buf_size;
yy_size_t yy_buf_size;
/* Number of characters read into yy_ch_buf, not including EOB
* characters.
*/
int yy_n_chars;
yy_size_t yy_n_chars;
/* Whether we "own" the buffer - i.e., we know we created it,
* and can realloc() it to grow it, and should free() it to
@ -420,25 +196,25 @@ struct yy_buffer_state
};
#endif /* !YY_STRUCT_YY_BUFFER_STATE */
void yyrestart ( FILE *input_file , yyscan_t yyscanner );
void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner );
YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size , yyscan_t yyscanner );
void yy_delete_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner );
void yy_flush_buffer ( YY_BUFFER_STATE b , yyscan_t yyscanner );
void yypush_buffer_state ( YY_BUFFER_STATE new_buffer , yyscan_t yyscanner );
void yypop_buffer_state ( yyscan_t yyscanner );
void xhpastrestart (FILE *input_file ,yyscan_t yyscanner );
void xhpast_switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
YY_BUFFER_STATE xhpast_create_buffer (FILE *file,int size ,yyscan_t yyscanner );
void xhpast_delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
void xhpast_flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
void xhpastpush_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
void xhpastpop_buffer_state (yyscan_t yyscanner );
YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size , yyscan_t yyscanner );
YY_BUFFER_STATE yy_scan_string ( const char *yy_str , yyscan_t yyscanner );
YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len , yyscan_t yyscanner );
YY_BUFFER_STATE xhpast_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner );
YY_BUFFER_STATE xhpast_scan_string (yyconst char *yy_str ,yyscan_t yyscanner );
YY_BUFFER_STATE xhpast_scan_bytes (yyconst char *bytes,yy_size_t len ,yyscan_t yyscanner );
void *yyalloc ( yy_size_t , yyscan_t yyscanner );
void *yyrealloc ( void *, yy_size_t , yyscan_t yyscanner );
void yyfree ( void * , yyscan_t yyscanner );
void *xhpastalloc (yy_size_t ,yyscan_t yyscanner );
void *xhpastrealloc (void *,yy_size_t ,yyscan_t yyscanner );
void xhpastfree (void * ,yyscan_t yyscanner );
/* Begin user sect3 */
#define xhpastwrap(yyscanner) (/*CONSTCOND*/1)
#define xhpastwrap(n) 1
#define YY_SKIP_YYWRAP
#define yytext_ptr yytext_r
@ -470,46 +246,42 @@ void yyfree ( void * , yyscan_t yyscanner );
#define YY_EXTRA_TYPE void *
#endif
int yylex_init (yyscan_t* scanner);
int xhpastlex_init (yyscan_t* scanner);
int yylex_init_extra ( YY_EXTRA_TYPE user_defined, yyscan_t* scanner);
int xhpastlex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner);
/* Accessor methods to globals.
These are made visible to non-reentrant scanners for convenience. */
int yylex_destroy ( yyscan_t yyscanner );
int xhpastlex_destroy (yyscan_t yyscanner );
int yyget_debug ( yyscan_t yyscanner );
int xhpastget_debug (yyscan_t yyscanner );
void yyset_debug ( int debug_flag , yyscan_t yyscanner );
void xhpastset_debug (int debug_flag ,yyscan_t yyscanner );
YY_EXTRA_TYPE yyget_extra ( yyscan_t yyscanner );
YY_EXTRA_TYPE xhpastget_extra (yyscan_t yyscanner );
void yyset_extra ( YY_EXTRA_TYPE user_defined , yyscan_t yyscanner );
void xhpastset_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner );
FILE *yyget_in ( yyscan_t yyscanner );
FILE *xhpastget_in (yyscan_t yyscanner );
void yyset_in ( FILE * _in_str , yyscan_t yyscanner );
void xhpastset_in (FILE * in_str ,yyscan_t yyscanner );
FILE *yyget_out ( yyscan_t yyscanner );
FILE *xhpastget_out (yyscan_t yyscanner );
void yyset_out ( FILE * _out_str , yyscan_t yyscanner );
void xhpastset_out (FILE * out_str ,yyscan_t yyscanner );
int yyget_leng ( yyscan_t yyscanner );
yy_size_t xhpastget_leng (yyscan_t yyscanner );
char *yyget_text ( yyscan_t yyscanner );
char *xhpastget_text (yyscan_t yyscanner );
int yyget_lineno ( yyscan_t yyscanner );
int xhpastget_lineno (yyscan_t yyscanner );
void yyset_lineno ( int _line_number , yyscan_t yyscanner );
void xhpastset_lineno (int line_number ,yyscan_t yyscanner );
int yyget_column ( yyscan_t yyscanner );
YYSTYPE * xhpastget_lval (yyscan_t yyscanner );
void yyset_column ( int _column_no , yyscan_t yyscanner );
YYSTYPE * yyget_lval ( yyscan_t yyscanner );
void yyset_lval ( YYSTYPE * yylval_param , yyscan_t yyscanner );
void xhpastset_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner );
/* Macros after this point can all be overridden by user definitions in
* section 1.
@ -517,18 +289,18 @@ void yyset_lval ( YYSTYPE * yylval_param , yyscan_t yyscanner );
#ifndef YY_SKIP_YYWRAP
#ifdef __cplusplus
extern "C" int yywrap ( yyscan_t yyscanner );
extern "C" int xhpastwrap (yyscan_t yyscanner );
#else
extern int yywrap ( yyscan_t yyscanner );
extern int xhpastwrap (yyscan_t yyscanner );
#endif
#endif
#ifndef yytext_ptr
static void yy_flex_strncpy ( char *, const char *, int , yyscan_t yyscanner);
static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner);
#endif
#ifdef YY_NEED_STRLEN
static int yy_flex_strlen ( const char * , yyscan_t yyscanner);
static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner);
#endif
#ifndef YY_NO_INPUT
@ -537,12 +309,7 @@ static int yy_flex_strlen ( const char * , yyscan_t yyscanner);
/* Amount of stuff to slurp up with each read. */
#ifndef YY_READ_BUF_SIZE
#ifdef __ia64__
/* On IA-64, the buffer size is 16k, not 8k */
#define YY_READ_BUF_SIZE 16384
#else
#define YY_READ_BUF_SIZE 8192
#endif /* __ia64__ */
#endif
/* Number of entries by which start-condition stack grows. */
@ -556,10 +323,10 @@ static int yy_flex_strlen ( const char * , yyscan_t yyscanner);
#ifndef YY_DECL
#define YY_DECL_IS_OURS 1
extern int yylex \
(YYSTYPE * yylval_param , yyscan_t yyscanner);
extern int xhpastlex \
(YYSTYPE * yylval_param ,yyscan_t yyscanner);
#define YY_DECL int yylex \
#define YY_DECL int xhpastlex \
(YYSTYPE * yylval_param , yyscan_t yyscanner)
#endif /* !YY_DECL */
@ -577,155 +344,10 @@ extern int yylex \
#undef YY_DECL
#endif
#ifndef xhpast_create_buffer_ALREADY_DEFINED
#undef yy_create_buffer
#endif
#ifndef xhpast_delete_buffer_ALREADY_DEFINED
#undef yy_delete_buffer
#endif
#ifndef xhpast_scan_buffer_ALREADY_DEFINED
#undef yy_scan_buffer
#endif
#ifndef xhpast_scan_string_ALREADY_DEFINED
#undef yy_scan_string
#endif
#ifndef xhpast_scan_bytes_ALREADY_DEFINED
#undef yy_scan_bytes
#endif
#ifndef xhpast_init_buffer_ALREADY_DEFINED
#undef yy_init_buffer
#endif
#ifndef xhpast_flush_buffer_ALREADY_DEFINED
#undef yy_flush_buffer
#endif
#ifndef xhpast_load_buffer_state_ALREADY_DEFINED
#undef yy_load_buffer_state
#endif
#ifndef xhpast_switch_to_buffer_ALREADY_DEFINED
#undef yy_switch_to_buffer
#endif
#ifndef xhpastpush_buffer_state_ALREADY_DEFINED
#undef yypush_buffer_state
#endif
#ifndef xhpastpop_buffer_state_ALREADY_DEFINED
#undef yypop_buffer_state
#endif
#ifndef xhpastensure_buffer_stack_ALREADY_DEFINED
#undef yyensure_buffer_stack
#endif
#ifndef xhpastlex_ALREADY_DEFINED
#undef yylex
#endif
#ifndef xhpastrestart_ALREADY_DEFINED
#undef yyrestart
#endif
#ifndef xhpastlex_init_ALREADY_DEFINED
#undef yylex_init
#endif
#ifndef xhpastlex_init_extra_ALREADY_DEFINED
#undef yylex_init_extra
#endif
#ifndef xhpastlex_destroy_ALREADY_DEFINED
#undef yylex_destroy
#endif
#ifndef xhpastget_debug_ALREADY_DEFINED
#undef yyget_debug
#endif
#ifndef xhpastset_debug_ALREADY_DEFINED
#undef yyset_debug
#endif
#ifndef xhpastget_extra_ALREADY_DEFINED
#undef yyget_extra
#endif
#ifndef xhpastset_extra_ALREADY_DEFINED
#undef yyset_extra
#endif
#ifndef xhpastget_in_ALREADY_DEFINED
#undef yyget_in
#endif
#ifndef xhpastset_in_ALREADY_DEFINED
#undef yyset_in
#endif
#ifndef xhpastget_out_ALREADY_DEFINED
#undef yyget_out
#endif
#ifndef xhpastset_out_ALREADY_DEFINED
#undef yyset_out
#endif
#ifndef xhpastget_leng_ALREADY_DEFINED
#undef yyget_leng
#endif
#ifndef xhpastget_text_ALREADY_DEFINED
#undef yyget_text
#endif
#ifndef xhpastget_lineno_ALREADY_DEFINED
#undef yyget_lineno
#endif
#ifndef xhpastset_lineno_ALREADY_DEFINED
#undef yyset_lineno
#endif
#ifndef xhpastget_column_ALREADY_DEFINED
#undef yyget_column
#endif
#ifndef xhpastset_column_ALREADY_DEFINED
#undef yyset_column
#endif
#ifndef xhpastwrap_ALREADY_DEFINED
#undef yywrap
#endif
#ifndef xhpastget_lval_ALREADY_DEFINED
#undef yyget_lval
#endif
#ifndef xhpastset_lval_ALREADY_DEFINED
#undef yyset_lval
#endif
#ifndef xhpastget_lloc_ALREADY_DEFINED
#undef yyget_lloc
#endif
#ifndef xhpastset_lloc_ALREADY_DEFINED
#undef yyset_lloc
#endif
#ifndef xhpastalloc_ALREADY_DEFINED
#undef yyalloc
#endif
#ifndef xhpastrealloc_ALREADY_DEFINED
#undef yyrealloc
#endif
#ifndef xhpastfree_ALREADY_DEFINED
#undef yyfree
#endif
#ifndef xhpasttext_ALREADY_DEFINED
#undef yytext
#endif
#ifndef xhpastleng_ALREADY_DEFINED
#undef yyleng
#endif
#ifndef xhpastin_ALREADY_DEFINED
#undef yyin
#endif
#ifndef xhpastout_ALREADY_DEFINED
#undef yyout
#endif
#ifndef xhpast_flex_debug_ALREADY_DEFINED
#undef yy_flex_debug
#endif
#ifndef xhpastlineno_ALREADY_DEFINED
#undef yylineno
#endif
#ifndef xhpasttables_fload_ALREADY_DEFINED
#undef yytables_fload
#endif
#ifndef xhpasttables_destroy_ALREADY_DEFINED
#undef yytables_destroy
#endif
#ifndef xhpastTABLES_NAME_ALREADY_DEFINED
#undef yyTABLES_NAME
#endif
#line 368 "scanner.l"
#line 367 "scanner.l"
#line 729 "scanner.lex.hpp"
#line 351 "scanner.lex.hpp"
#undef xhpastIN_HEADER
#endif /* xhpastHEADER_H */
/* @generated */