#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <stdlib.h>
#include "php_parser.h"
#include <unistd.h>
Go to the source code of this file.
Data Structures | |
struct | yy_buffer_state |
struct | yy_trans_info |
Defines | |
#define | YY_INT_ALIGNED short int |
#define | FLEX_SCANNER |
#define | YY_FLEX_MAJOR_VERSION 2 |
#define | YY_FLEX_MINOR_VERSION 5 |
#define | YY_FLEX_SUBMINOR_VERSION 31 |
#define | FLEX_BETA |
#define | INT8_MIN (-128) |
#define | INT16_MIN (-32767-1) |
#define | INT32_MIN (-2147483647-1) |
#define | INT8_MAX (127) |
#define | INT16_MAX (32767) |
#define | INT32_MAX (2147483647) |
#define | UINT8_MAX (255U) |
#define | UINT16_MAX (65535U) |
#define | UINT32_MAX (4294967295U) |
#define | yyconst |
#define | YY_NULL 0 |
#define | YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) |
#define | BEGIN (yy_start) = 1 + 2 * |
#define | YY_START (((yy_start) - 1) / 2) |
#define | YYSTATE YY_START |
#define | YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) |
#define | YY_NEW_FILE yyrestart(yyin ) |
#define | YY_END_OF_BUFFER_CHAR 0 |
#define | YY_BUF_SIZE 16384 |
#define | EOB_ACT_CONTINUE_SCAN 0 |
#define | EOB_ACT_END_OF_FILE 1 |
#define | EOB_ACT_LAST_MATCH 2 |
#define | YY_LESS_LINENO(n) |
#define | yyless(n) |
#define | unput(c) yyunput( c, (yytext_ptr) ) |
#define | YY_BUFFER_NEW 0 |
#define | YY_BUFFER_NORMAL 1 |
#define | YY_BUFFER_EOF_PENDING 2 |
#define | YY_CURRENT_BUFFER |
#define | YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] |
#define | YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER ) |
#define | yy_new_buffer yy_create_buffer |
#define | yy_set_interactive(is_interactive) |
#define | yy_set_bol(at_bol) |
#define | YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) |
#define | yywrap() 1 |
#define | YY_SKIP_YYWRAP |
#define | yytext_ptr yytext |
#define | YY_DO_BEFORE_ACTION |
#define | YY_NUM_RULES 172 |
#define | YY_END_OF_BUFFER 173 |
#define | REJECT reject_used_but_not_detected |
#define | yymore() ((yy_more_flag) = 1) |
#define | YY_MORE_ADJ (yy_more_len) |
#define | YY_RESTORE_YY_MORE_OFFSET |
#define | INITIAL 0 |
#define | ST_IN_SCRIPTING 1 |
#define | ST_DOUBLE_QUOTES 2 |
#define | ST_SINGLE_QUOTE 3 |
#define | ST_BACKQUOTE 4 |
#define | ST_HEREDOC 5 |
#define | ST_LOOKING_FOR_PROPERTY 6 |
#define | ST_LOOKING_FOR_VARNAME 7 |
#define | ST_COMMENT 8 |
#define | ST_DOC_COMMENT 9 |
#define | ST_ONE_LINE_COMMENT 10 |
#define | YY_EXTRA_TYPE void * |
#define | YY_READ_BUF_SIZE 8192 |
#define | ECHO (void) fwrite( yytext, yyleng, 1, yyout ) |
#define | YY_INPUT(buf, result, max_size) |
#define | yyterminate() return YY_NULL |
#define | YY_START_STACK_INCR 25 |
#define | YY_FATAL_ERROR(msg) yy_fatal_error( msg ) |
#define | YY_DECL_IS_OURS 1 |
#define | YY_DECL int yylex (void) |
#define | YY_BREAK break; |
#define | YY_RULE_SETUP |
#define | YY_EXIT_FAILURE 2 |
#define | yyless(n) |
#define | YYTABLES_NAME "yytables" |
Typedefs | |
typedef signed char | flex_int8_t |
typedef short int | flex_int16_t |
typedef int | flex_int32_t |
typedef unsigned char | flex_uint8_t |
typedef unsigned short int | flex_uint16_t |
typedef unsigned int | flex_uint32_t |
typedef struct yy_buffer_state * | YY_BUFFER_STATE |
typedef unsigned int | yy_size_t |
typedef unsigned char | YY_CHAR |
typedef int | yy_state_type |
Functions | |
void | yyrestart (FILE *input_file) |
void | yy_switch_to_buffer (YY_BUFFER_STATE new_buffer) |
YY_BUFFER_STATE | yy_create_buffer (FILE *file, int size) |
void | yy_delete_buffer (YY_BUFFER_STATE b) |
void | yy_flush_buffer (YY_BUFFER_STATE b) |
void | yypush_buffer_state (YY_BUFFER_STATE new_buffer) |
void | yypop_buffer_state (void) |
static void | yyensure_buffer_stack (void) |
static void | yy_load_buffer_state (void) |
static void | yy_init_buffer (YY_BUFFER_STATE b, FILE *file) |
YY_BUFFER_STATE | yy_scan_buffer (char *base, yy_size_t size) |
YY_BUFFER_STATE | yy_scan_string (char *yy_str) |
YY_BUFFER_STATE | yy_scan_bytes (char *bytes, int len) |
void * | yyalloc (yy_size_t) |
void * | yyrealloc (void *, yy_size_t) |
void | yyfree (void *) |
static yy_state_type | yy_get_previous_state (void) |
static yy_state_type | yy_try_NUL_trans (yy_state_type current_state) |
static int | yy_get_next_buffer (void) |
static void | yy_fatal_error (char msg[]) |
int | getLineno () |
static void | yyunput (int c, char *buf_ptr) |
static int | input (void) |
static void | yy_push_state (int new_state) |
static void | yy_pop_state (void) |
static int | yy_top_state (void) |
int | yylex (void) |
static void | yyunput (int c, register char *yy_bp) |
int | isatty (int) |
static void | yy_fatal_error (char *msg) |
int | yyget_lineno (void) |
FILE * | yyget_in (void) |
FILE * | yyget_out (void) |
int | yyget_leng (void) |
char * | yyget_text (void) |
void | yyset_lineno (int line_number) |
void | yyset_in (FILE *in_str) |
void | yyset_out (FILE *out_str) |
int | yyget_debug (void) |
void | yyset_debug (int bdebug) |
int | yylex_destroy (void) |
Variables | |
int | yyleng |
FILE * | yyin |
FILE * | yyout |
static size_t | yy_buffer_stack_top = 0 |
static size_t | yy_buffer_stack_max = 0 |
static YY_BUFFER_STATE * | yy_buffer_stack = 0 |
static char | yy_hold_char |
static int | yy_n_chars |
int | yyleng |
static char * | yy_c_buf_p = (char *) 0 |
static int | yy_init = 1 |
static int | yy_start = 0 |
static int | yy_did_buffer_switch_on_eof |
FILE * | yyin = (FILE *) 0 |
FILE * | yyout = (FILE *) 0 |
int | yylineno |
int | yylineno = 1 |
char * | yytext |
static flex_int16_t | yy_accept [1454] |
static flex_int32_t | yy_ec [256] |
static flex_int32_t | yy_meta [80] |
static flex_int16_t | yy_base [1878] |
static flex_int16_t | yy_def [1878] |
static flex_int16_t | yy_nxt [8200] |
static flex_int16_t | yy_chk [8200] |
static flex_int32_t | yy_rule_can_match_eol [173] |
static yy_state_type | yy_last_accepting_state |
static char * | yy_last_accepting_cpos |
int | yy_flex_debug |
int | yy_flex_debug = 0 |
static int | yy_more_flag = 0 |
static int | yy_more_len = 0 |
char * | yytext |
int | asp_tags = 0 |
int | short_tags = 0 |
int | lineno = 0 |
int | comment_start_line = 0 |
int | heredoc_len = 4 |
int * | heredoc |
static int | yy_start_stack_ptr = 0 |
static int | yy_start_stack_depth = 0 |
static int * | yy_start_stack = 0 |
#define BEGIN (yy_start) = 1 + 2 * |
Definition at line 116 of file php_lexer.c.
Referenced by yy_pop_state(), yy_push_state(), and yylex().
#define EOB_ACT_CONTINUE_SCAN 0 |
Definition at line 147 of file php_lexer.c.
Referenced by input(), yy_get_next_buffer(), and yylex().
#define EOB_ACT_END_OF_FILE 1 |
Definition at line 148 of file php_lexer.c.
Referenced by input(), yy_get_next_buffer(), and yylex().
#define EOB_ACT_LAST_MATCH 2 |
Definition at line 149 of file php_lexer.c.
Referenced by input(), yy_get_next_buffer(), and yylex().
#define FLEX_BETA |
Definition at line 14 of file php_lexer.c.
#define FLEX_SCANNER |
Definition at line 9 of file php_lexer.c.
#define INITIAL 0 |
#define INT16_MAX (32767) |
Definition at line 65 of file php_lexer.c.
#define INT16_MIN (-32767-1) |
Definition at line 56 of file php_lexer.c.
#define INT32_MAX (2147483647) |
Definition at line 68 of file php_lexer.c.
#define INT32_MIN (-2147483647-1) |
Definition at line 59 of file php_lexer.c.
#define INT8_MAX (127) |
Definition at line 62 of file php_lexer.c.
#define INT8_MIN (-128) |
Definition at line 53 of file php_lexer.c.
#define REJECT reject_used_but_not_detected |
Definition at line 2841 of file php_lexer.c.
#define ST_BACKQUOTE 4 |
#define ST_COMMENT 8 |
#define ST_DOC_COMMENT 9 |
#define ST_DOUBLE_QUOTES 2 |
#define ST_HEREDOC 5 |
#define ST_IN_SCRIPTING 1 |
#define ST_LOOKING_FOR_PROPERTY 6 |
#define ST_LOOKING_FOR_VARNAME 7 |
#define ST_ONE_LINE_COMMENT 10 |
#define ST_SINGLE_QUOTE 3 |
#define UINT16_MAX (65535U) |
Definition at line 74 of file php_lexer.c.
#define UINT32_MAX (4294967295U) |
Definition at line 77 of file php_lexer.c.
#define UINT8_MAX (255U) |
Definition at line 71 of file php_lexer.c.
#define unput | ( | c | ) | yyunput( c, (yytext_ptr) ) |
Definition at line 180 of file php_lexer.c.
#define YY_AT_BOL | ( | ) | (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) |
#define YY_BREAK break; |
#define YY_BUF_SIZE 16384 |
#define YY_BUFFER_EOF_PENDING 2 |
#define YY_BUFFER_NEW 0 |
Definition at line 240 of file php_lexer.c.
Referenced by yy_flush_buffer(), yy_scan_buffer(), and yylex().
#define YY_BUFFER_NORMAL 1 |
#define YY_CURRENT_BUFFER |
Value:
( (yy_buffer_stack) \ ? (yy_buffer_stack)[(yy_buffer_stack_top)] \ : NULL)
Definition at line 268 of file php_lexer.c.
Referenced by yy_delete_buffer(), yy_flush_buffer(), yy_get_next_buffer(), yy_init_buffer(), yy_switch_to_buffer(), yylex(), yylex_destroy(), yypop_buffer_state(), yypush_buffer_state(), and yyrestart().
#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] |
Definition at line 275 of file php_lexer.c.
Referenced by input(), yy_delete_buffer(), yy_get_next_buffer(), yy_load_buffer_state(), yy_switch_to_buffer(), yylex(), yylex_destroy(), yypop_buffer_state(), yypush_buffer_state(), yyrestart(), and yyunput().
#define YY_DECL int yylex (void) |
Definition at line 3040 of file php_lexer.c.
#define YY_DECL_IS_OURS 1 |
Definition at line 3036 of file php_lexer.c.
#define YY_DO_BEFORE_ACTION |
Value:
(yytext_ptr) = yy_bp; \ (yytext_ptr) -= (yy_more_len); \ yyleng = (size_t) (yy_cp - (yytext_ptr)); \ (yy_hold_char) = *yy_cp; \ *yy_cp = '\0'; \ (yy_c_buf_p) = yy_cp;
Definition at line 362 of file php_lexer.c.
Referenced by yylex().
#define YY_END_OF_BUFFER 173 |
#define YY_END_OF_BUFFER_CHAR 0 |
Definition at line 131 of file php_lexer.c.
Referenced by input(), yy_flush_buffer(), yy_get_next_buffer(), yy_scan_buffer(), and yy_scan_bytes().
#define YY_EXIT_FAILURE 2 |
#define YY_EXTRA_TYPE void * |
Definition at line 2918 of file php_lexer.c.
#define YY_FATAL_ERROR | ( | msg | ) | yy_fatal_error( msg ) |
Definition at line 3027 of file php_lexer.c.
Referenced by yy_create_buffer(), yy_get_next_buffer(), yy_pop_state(), yy_push_state(), yy_scan_buffer(), yy_scan_bytes(), yylex(), and yyunput().
#define YY_FLEX_MAJOR_VERSION 2 |
Definition at line 10 of file php_lexer.c.
#define YY_FLEX_MINOR_VERSION 5 |
Definition at line 11 of file php_lexer.c.
#define YY_FLEX_SUBMINOR_VERSION 31 |
Definition at line 12 of file php_lexer.c.
#define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER ) |
Definition at line 304 of file php_lexer.c.
#define YY_INPUT | ( | buf, | |||
result, | |||||
max_size | ) |
Value:
if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ { \ int c = '*'; \ size_t n; \ for ( n = 0; n < max_size && \ (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ buf[n] = (char) c; \ if ( c == '\n' ) \ buf[n++] = (char) c; \ if ( c == EOF && ferror( yyin ) ) \ YY_FATAL_ERROR( "input in flex scanner failed" ); \ result = n; \ } \ else \ { \ errno=0; \ while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \ { \ if( errno != EINTR) \ { \ YY_FATAL_ERROR( "input in flex scanner failed" ); \ break; \ } \ errno=0; \ clearerr(yyin); \ } \ }\ \
Definition at line 2980 of file php_lexer.c.
Referenced by yy_get_next_buffer().
#define YY_INT_ALIGNED short int |
Definition at line 5 of file php_lexer.c.
#define YY_LESS_LINENO | ( | n | ) |
Value:
do { \ int yyl;\ for ( yyl = n; yyl < yyleng; ++yyl )\ if ( yytext[yyl] == '\n' )\ --yylineno;\ }while(0)
Definition at line 158 of file php_lexer.c.
#define YY_MORE_ADJ (yy_more_len) |
Definition at line 2845 of file php_lexer.c.
Referenced by yy_get_next_buffer(), yy_get_previous_state(), and yylex().
#define yy_new_buffer yy_create_buffer |
Definition at line 314 of file php_lexer.c.
#define YY_NEW_FILE yyrestart(yyin ) |
#define YY_NULL 0 |
Definition at line 103 of file php_lexer.c.
#define YY_NUM_RULES 172 |
Definition at line 370 of file php_lexer.c.
#define YY_READ_BUF_SIZE 8192 |
#define YY_RESTORE_YY_MORE_OFFSET |
#define YY_RULE_SETUP |
Value:
if ( yyleng > 0 ) \ YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \ (yytext[yyleng - 1] == '\n'); \ YY_USER_ACTION
Definition at line 3055 of file php_lexer.c.
Referenced by yylex().
#define YY_SC_TO_UI | ( | c | ) | ((unsigned int) (unsigned char) c) |
#define yy_set_bol | ( | at_bol | ) |
Value:
{ \ if ( ! YY_CURRENT_BUFFER ){\ yyensure_buffer_stack (); \ YY_CURRENT_BUFFER_LVALUE = \ yy_create_buffer(yyin,YY_BUF_SIZE ); \ } \ YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ }
Definition at line 326 of file php_lexer.c.
#define yy_set_interactive | ( | is_interactive | ) |
Value:
{ \ if ( ! YY_CURRENT_BUFFER ){ \ yyensure_buffer_stack (); \ YY_CURRENT_BUFFER_LVALUE = \ yy_create_buffer(yyin,YY_BUF_SIZE ); \ } \ YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ }
Definition at line 316 of file php_lexer.c.
#define YY_SKIP_YYWRAP |
Definition at line 339 of file php_lexer.c.
#define YY_START (((yy_start) - 1) / 2) |
#define YY_START_STACK_INCR 25 |
#define YY_STATE_EOF | ( | state | ) | (YY_END_OF_BUFFER + state + 1) |
#define yyconst |
Definition at line 99 of file php_lexer.c.
#define yyless | ( | n | ) |
Value:
do \ { \ /* Undo effects of setting up yytext. */ \ int yyless_macro_arg = (n); \ YY_LESS_LINENO(yyless_macro_arg);\ yytext[yyleng] = (yy_hold_char); \ (yy_c_buf_p) = yytext + yyless_macro_arg; \ (yy_hold_char) = *(yy_c_buf_p); \ *(yy_c_buf_p) = '\0'; \ yyleng = yyless_macro_arg; \ } \ while ( 0 )
Definition at line 5413 of file php_lexer.c.
#define yyless | ( | n | ) |
Value:
do \ { \ /* Undo effects of setting up yytext. */ \ int yyless_macro_arg = (n); \ YY_LESS_LINENO(yyless_macro_arg);\ *yy_cp = (yy_hold_char); \ YY_RESTORE_YY_MORE_OFFSET \ (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ YY_DO_BEFORE_ACTION; /* set up yytext again */ \ } \ while ( 0 )
Definition at line 5413 of file php_lexer.c.
Referenced by yylex().
#define yymore | ( | ) | ((yy_more_flag) = 1) |
#define YYSTATE YY_START |
#define YYTABLES_NAME "yytables" |
Definition at line 5575 of file php_lexer.c.
#define yyterminate | ( | ) | return YY_NULL |
#define yytext_ptr yytext |
Definition at line 352 of file php_lexer.c.
Referenced by input(), yy_get_next_buffer(), yy_get_previous_state(), yy_load_buffer_state(), yylex(), and yyunput().
#define yywrap | ( | ) | 1 |
typedef short int flex_int16_t |
Definition at line 44 of file php_lexer.c.
typedef int flex_int32_t |
Definition at line 45 of file php_lexer.c.
typedef signed char flex_int8_t |
Definition at line 43 of file php_lexer.c.
typedef unsigned short int flex_uint16_t |
Definition at line 47 of file php_lexer.c.
typedef unsigned int flex_uint32_t |
Definition at line 48 of file php_lexer.c.
typedef unsigned char flex_uint8_t |
Definition at line 46 of file php_lexer.c.
typedef struct yy_buffer_state* YY_BUFFER_STATE |
Definition at line 140 of file php_lexer.c.
typedef unsigned char YY_CHAR |
Definition at line 341 of file php_lexer.c.
typedef unsigned int yy_size_t |
Definition at line 189 of file php_lexer.c.
typedef int yy_state_type |
Definition at line 345 of file php_lexer.c.
int getLineno | ( | ) |
static int input | ( | void | ) | [static] |
Definition at line 4937 of file php_lexer.c.
References EOB_ACT_CONTINUE_SCAN, EOB_ACT_END_OF_FILE, EOB_ACT_LAST_MATCH, yy_c_buf_p, YY_CURRENT_BUFFER_LVALUE, yy_did_buffer_switch_on_eof, YY_END_OF_BUFFER_CHAR, yy_get_next_buffer(), yy_hold_char, yy_n_chars, YY_NEW_FILE, yyin, yyrestart(), yytext_ptr, and yywrap.
04940 { 04941 int c; 04942 04943 *(yy_c_buf_p) = (yy_hold_char); 04944 04945 if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR ) 04946 { 04947 /* yy_c_buf_p now points to the character we want to return. 04948 * If this occurs *before* the EOB characters, then it's a 04949 * valid NUL; if not, then we've hit the end of the buffer. 04950 */ 04951 if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) 04952 /* This was really a NUL. */ 04953 *(yy_c_buf_p) = '\0'; 04954 04955 else 04956 { /* need more input */ 04957 int offset = (yy_c_buf_p) - (yytext_ptr); 04958 ++(yy_c_buf_p); 04959 04960 switch ( yy_get_next_buffer( ) ) 04961 { 04962 case EOB_ACT_LAST_MATCH: 04963 /* This happens because yy_g_n_b() 04964 * sees that we've accumulated a 04965 * token and flags that we need to 04966 * try matching the token before 04967 * proceeding. But for input(), 04968 * there's no matching to consider. 04969 * So convert the EOB_ACT_LAST_MATCH 04970 * to EOB_ACT_END_OF_FILE. 04971 */ 04972 04973 /* Reset buffer status. */ 04974 yyrestart(yyin ); 04975 04976 /*FALLTHROUGH*/ 04977 04978 case EOB_ACT_END_OF_FILE: 04979 { 04980 if ( yywrap( ) ) 04981 return EOF; 04982 04983 if ( ! (yy_did_buffer_switch_on_eof) ) 04984 YY_NEW_FILE; 04985 #ifdef __cplusplus 04986 return yyinput(); 04987 #else 04988 return input(); 04989 #endif 04990 } 04991 04992 case EOB_ACT_CONTINUE_SCAN: 04993 (yy_c_buf_p) = (yytext_ptr) + offset; 04994 break; 04995 } 04996 } 04997 } 04998 04999 c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */ 05000 *(yy_c_buf_p) = '\0'; /* preserve yytext */ 05001 (yy_hold_char) = *++(yy_c_buf_p); 05002 05003 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n'); 05004 if ( YY_CURRENT_BUFFER_LVALUE->yy_at_bol ) 05005 05006 yylineno++; 05007 ; 05008 05009 return c; 05010 }
int isatty | ( | int | ) |
YY_BUFFER_STATE yy_create_buffer | ( | FILE * | file, | |
int | size | |||
) |
Allocate and initialize an input buffer state.
file | A readable stream. | |
size | The character buffer size in bytes. When in doubt, use YY_BUF_SIZE . |
Definition at line 5080 of file php_lexer.c.
References yy_buffer_state::yy_buf_size, yy_buffer_state::yy_ch_buf, YY_FATAL_ERROR, yy_init_buffer(), yy_buffer_state::yy_is_our_buffer, and yyalloc().
Referenced by yylex(), and yyrestart().
05081 { 05082 YY_BUFFER_STATE b; 05083 05084 b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) ); 05085 if ( ! b ) 05086 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); 05087 05088 b->yy_buf_size = size; 05089 05090 /* yy_ch_buf has to be 2 characters longer than the size given because 05091 * we need to put in 2 end-of-buffer characters. 05092 */ 05093 b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2 ); 05094 if ( ! b->yy_ch_buf ) 05095 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); 05096 05097 b->yy_is_our_buffer = 1; 05098 05099 yy_init_buffer(b,file ); 05100 05101 return b; 05102 }
void yy_delete_buffer | ( | YY_BUFFER_STATE | b | ) |
Destroy the buffer.
b | a buffer created with yy_create_buffer() |
Definition at line 5108 of file php_lexer.c.
References yy_buffer_state::yy_ch_buf, YY_CURRENT_BUFFER, YY_CURRENT_BUFFER_LVALUE, yy_buffer_state::yy_is_our_buffer, and yyfree().
Referenced by yylex_destroy(), and yypop_buffer_state().
05109 { 05110 05111 if ( ! b ) 05112 return; 05113 05114 if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ 05115 YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; 05116 05117 if ( b->yy_is_our_buffer ) 05118 yyfree((void *) b->yy_ch_buf ); 05119 05120 yyfree((void *) b ); 05121 }
static void yy_fatal_error | ( | char * | msg | ) | [static] |
Definition at line 5404 of file php_lexer.c.
References YY_EXIT_FAILURE.
05405 { 05406 (void) fprintf( stderr, "%s\n", msg ); 05407 exit( YY_EXIT_FAILURE ); 05408 }
static void yy_fatal_error | ( | char | msg[] | ) | [static] |
void yy_flush_buffer | ( | YY_BUFFER_STATE | b | ) |
Discard all buffered characters. On the next scan, YY_INPUT will be called.
b | the buffer state to be flushed, usually YY_CURRENT_BUFFER . |
Definition at line 5159 of file php_lexer.c.
References yy_buffer_state::yy_at_bol, yy_buffer_state::yy_buf_pos, YY_BUFFER_NEW, yy_buffer_state::yy_buffer_status, yy_buffer_state::yy_ch_buf, YY_CURRENT_BUFFER, YY_END_OF_BUFFER_CHAR, yy_load_buffer_state(), and yy_buffer_state::yy_n_chars.
Referenced by yy_init_buffer().
05160 { 05161 if ( ! b ) 05162 return; 05163 05164 b->yy_n_chars = 0; 05165 05166 /* We always need two end-of-buffer characters. The first causes 05167 * a transition to the end-of-buffer state. The second causes 05168 * a jam in that state. 05169 */ 05170 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; 05171 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; 05172 05173 b->yy_buf_pos = &b->yy_ch_buf[0]; 05174 05175 b->yy_at_bol = 1; 05176 b->yy_buffer_status = YY_BUFFER_NEW; 05177 05178 if ( b == YY_CURRENT_BUFFER ) 05179 yy_load_buffer_state( ); 05180 }
static int yy_get_next_buffer | ( | void | ) | [static] |
Definition at line 4710 of file php_lexer.c.
References EOB_ACT_CONTINUE_SCAN, EOB_ACT_END_OF_FILE, EOB_ACT_LAST_MATCH, yy_buffer_state::yy_buf_size, YY_BUFFER_EOF_PENDING, yy_c_buf_p, yy_buffer_state::yy_ch_buf, YY_CURRENT_BUFFER, YY_CURRENT_BUFFER_LVALUE, YY_END_OF_BUFFER_CHAR, YY_FATAL_ERROR, YY_INPUT, yy_buffer_state::yy_is_our_buffer, YY_MORE_ADJ, yy_n_chars, YY_READ_BUF_SIZE, yyin, yyrealloc(), yyrestart(), and yytext_ptr.
Referenced by input(), and yylex().
04711 { 04712 register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; 04713 register char *source = (yytext_ptr); 04714 register int number_to_move, i; 04715 int ret_val; 04716 04717 if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) 04718 YY_FATAL_ERROR( 04719 "fatal flex scanner internal error--end of buffer missed" ); 04720 04721 if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) 04722 { /* Don't try to fill the buffer, so this is an EOF. */ 04723 if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 ) 04724 { 04725 /* We matched a single character, the EOB, so 04726 * treat this as a final EOF. 04727 */ 04728 return EOB_ACT_END_OF_FILE; 04729 } 04730 04731 else 04732 { 04733 /* We matched some text prior to the EOB, first 04734 * process it. 04735 */ 04736 return EOB_ACT_LAST_MATCH; 04737 } 04738 } 04739 04740 /* Try to read more data. */ 04741 04742 /* First move last chars to start of buffer. */ 04743 number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1; 04744 04745 for ( i = 0; i < number_to_move; ++i ) 04746 *(dest++) = *(source++); 04747 04748 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) 04749 /* don't do the read, it's not guaranteed to return an EOF, 04750 * just force an EOF 04751 */ 04752 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0; 04753 04754 else 04755 { 04756 int num_to_read = 04757 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; 04758 04759 while ( num_to_read <= 0 ) 04760 { /* Not enough room in the buffer - grow it. */ 04761 04762 /* just a shorter name for the current buffer */ 04763 YY_BUFFER_STATE b = YY_CURRENT_BUFFER; 04764 04765 int yy_c_buf_p_offset = 04766 (int) ((yy_c_buf_p) - b->yy_ch_buf); 04767 04768 if ( b->yy_is_our_buffer ) 04769 { 04770 int new_size = b->yy_buf_size * 2; 04771 04772 if ( new_size <= 0 ) 04773 b->yy_buf_size += b->yy_buf_size / 8; 04774 else 04775 b->yy_buf_size *= 2; 04776 04777 b->yy_ch_buf = (char *) 04778 /* Include room in for 2 EOB chars. */ 04779 yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ); 04780 } 04781 else 04782 /* Can't grow it, we don't own it. */ 04783 b->yy_ch_buf = 0; 04784 04785 if ( ! b->yy_ch_buf ) 04786 YY_FATAL_ERROR( 04787 "fatal error - scanner input buffer overflow" ); 04788 04789 (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset]; 04790 04791 num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - 04792 number_to_move - 1; 04793 04794 } 04795 04796 if ( num_to_read > YY_READ_BUF_SIZE ) 04797 num_to_read = YY_READ_BUF_SIZE; 04798 04799 /* Read in more data. */ 04800 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), 04801 (yy_n_chars), num_to_read ); 04802 04803 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); 04804 } 04805 04806 if ( (yy_n_chars) == 0 ) 04807 { 04808 if ( number_to_move == YY_MORE_ADJ ) 04809 { 04810 ret_val = EOB_ACT_END_OF_FILE; 04811 yyrestart(yyin ); 04812 } 04813 04814 else 04815 { 04816 ret_val = EOB_ACT_LAST_MATCH; 04817 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = 04818 YY_BUFFER_EOF_PENDING; 04819 } 04820 } 04821 04822 else 04823 ret_val = EOB_ACT_CONTINUE_SCAN; 04824 04825 (yy_n_chars) += number_to_move; 04826 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; 04827 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; 04828 04829 (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; 04830 04831 return ret_val; 04832 }
static yy_state_type yy_get_previous_state | ( | void | ) | [static] |
Definition at line 4836 of file php_lexer.c.
References YY_AT_BOL, yy_c_buf_p, YY_MORE_ADJ, YY_SC_TO_UI, yy_start, and yytext_ptr.
Referenced by yylex().
04837 { 04838 register yy_state_type yy_current_state; 04839 register char *yy_cp; 04840 04841 yy_current_state = (yy_start); 04842 yy_current_state += YY_AT_BOL(); 04843 04844 for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) 04845 { 04846 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); 04847 if ( yy_accept[yy_current_state] ) 04848 { 04849 (yy_last_accepting_state) = yy_current_state; 04850 (yy_last_accepting_cpos) = yy_cp; 04851 } 04852 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) 04853 { 04854 yy_current_state = (int) yy_def[yy_current_state]; 04855 if ( yy_current_state >= 1454 ) 04856 yy_c = yy_meta[(unsigned int) yy_c]; 04857 } 04858 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; 04859 } 04860 04861 return yy_current_state; 04862 }
static void yy_init_buffer | ( | YY_BUFFER_STATE | b, | |
FILE * | file | |||
) | [static] |
Definition at line 5131 of file php_lexer.c.
References isatty(), yy_buffer_state::yy_bs_column, yy_buffer_state::yy_bs_lineno, YY_CURRENT_BUFFER, yy_buffer_state::yy_fill_buffer, yy_flush_buffer(), yy_buffer_state::yy_input_file, and yy_buffer_state::yy_is_interactive.
Referenced by yy_create_buffer(), and yyrestart().
05133 { 05134 int oerrno = errno; 05135 05136 yy_flush_buffer(b ); 05137 05138 b->yy_input_file = file; 05139 b->yy_fill_buffer = 1; 05140 05141 /* If b is the current buffer, then yy_init_buffer was _probably_ 05142 * called from yyrestart() or through yy_get_next_buffer. 05143 * In that case, we don't want to reset the lineno or column. 05144 */ 05145 if (b != YY_CURRENT_BUFFER){ 05146 b->yy_bs_lineno = 1; 05147 b->yy_bs_column = 0; 05148 } 05149 05150 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; 05151 05152 errno = oerrno; 05153 }
static void yy_load_buffer_state | ( | void | ) | [static] |
Definition at line 5066 of file php_lexer.c.
References yy_c_buf_p, YY_CURRENT_BUFFER_LVALUE, yy_hold_char, yy_n_chars, yyin, and yytext_ptr.
Referenced by yy_flush_buffer(), yy_switch_to_buffer(), yylex(), yypop_buffer_state(), yypush_buffer_state(), and yyrestart().
05067 { 05068 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; 05069 (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; 05070 yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; 05071 (yy_hold_char) = *(yy_c_buf_p); 05072 }
static void yy_pop_state | ( | void | ) | [static] |
Definition at line 5387 of file php_lexer.c.
References BEGIN, and YY_FATAL_ERROR.
Referenced by yylex().
05388 { 05389 if ( --(yy_start_stack_ptr) < 0 ) 05390 YY_FATAL_ERROR( "start-condition stack underflow" ); 05391 05392 BEGIN((yy_start_stack)[(yy_start_stack_ptr)]); 05393 }
static void yy_push_state | ( | int | new_state | ) | [static] |
Definition at line 5362 of file php_lexer.c.
References BEGIN, YY_FATAL_ERROR, YY_START, YY_START_STACK_INCR, yyalloc(), and yyrealloc().
Referenced by yylex().
05363 { 05364 if ( (yy_start_stack_ptr) >= (yy_start_stack_depth) ) 05365 { 05366 yy_size_t new_size; 05367 05368 (yy_start_stack_depth) += YY_START_STACK_INCR; 05369 new_size = (yy_start_stack_depth) * sizeof( int ); 05370 05371 if ( ! (yy_start_stack) ) 05372 (yy_start_stack) = (int *) yyalloc(new_size ); 05373 05374 else 05375 (yy_start_stack) = (int *) yyrealloc((void *) (yy_start_stack),new_size ); 05376 05377 if ( ! (yy_start_stack) ) 05378 YY_FATAL_ERROR( 05379 "out of memory expanding start-condition stack" ); 05380 } 05381 05382 (yy_start_stack)[(yy_start_stack_ptr)++] = YY_START; 05383 05384 BEGIN(new_state); 05385 }
YY_BUFFER_STATE yy_scan_buffer | ( | char * | base, | |
yy_size_t | size | |||
) |
Setup the input buffer state to scan directly from a user-specified character buffer.
base | the character buffer | |
size | the size in bytes of the character buffer |
Definition at line 5282 of file php_lexer.c.
References yy_buffer_state::yy_at_bol, yy_buffer_state::yy_buf_pos, yy_buffer_state::yy_buf_size, YY_BUFFER_NEW, yy_buffer_state::yy_buffer_status, yy_buffer_state::yy_ch_buf, YY_END_OF_BUFFER_CHAR, YY_FATAL_ERROR, yy_buffer_state::yy_fill_buffer, yy_buffer_state::yy_input_file, yy_buffer_state::yy_is_interactive, yy_buffer_state::yy_is_our_buffer, yy_buffer_state::yy_n_chars, yy_switch_to_buffer(), and yyalloc().
Referenced by yy_scan_bytes().
05283 { 05284 YY_BUFFER_STATE b; 05285 05286 if ( size < 2 || 05287 base[size-2] != YY_END_OF_BUFFER_CHAR || 05288 base[size-1] != YY_END_OF_BUFFER_CHAR ) 05289 /* They forgot to leave room for the EOB's. */ 05290 return 0; 05291 05292 b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) ); 05293 if ( ! b ) 05294 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); 05295 05296 b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ 05297 b->yy_buf_pos = b->yy_ch_buf = base; 05298 b->yy_is_our_buffer = 0; 05299 b->yy_input_file = 0; 05300 b->yy_n_chars = b->yy_buf_size; 05301 b->yy_is_interactive = 0; 05302 b->yy_at_bol = 1; 05303 b->yy_fill_buffer = 0; 05304 b->yy_buffer_status = YY_BUFFER_NEW; 05305 05306 yy_switch_to_buffer(b ); 05307 05308 return b; 05309 }
YY_BUFFER_STATE yy_scan_bytes | ( | char * | bytes, | |
int | len | |||
) |
Setup the input buffer state to scan the given bytes. The next call to yylex() will scan from a copy of bytes.
bytes | the byte buffer to scan | |
len | the number of bytes in the buffer pointed to by bytes. |
Definition at line 5332 of file php_lexer.c.
References YY_END_OF_BUFFER_CHAR, YY_FATAL_ERROR, yy_buffer_state::yy_is_our_buffer, yy_scan_buffer(), and yyalloc().
Referenced by yy_scan_string().
05333 { 05334 YY_BUFFER_STATE b; 05335 char *buf; 05336 yy_size_t n; 05337 int i; 05338 05339 /* Get memory for full buffer, including space for trailing EOB's. */ 05340 n = len + 2; 05341 buf = (char *) yyalloc(n ); 05342 if ( ! buf ) 05343 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); 05344 05345 for ( i = 0; i < len; ++i ) 05346 buf[i] = bytes[i]; 05347 05348 buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR; 05349 05350 b = yy_scan_buffer(buf,n ); 05351 if ( ! b ) 05352 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); 05353 05354 /* It's okay to grow etc. this buffer, and we should throw it 05355 * away when we're done. 05356 */ 05357 b->yy_is_our_buffer = 1; 05358 05359 return b; 05360 }
YY_BUFFER_STATE yy_scan_string | ( | char * | yy_str | ) |
Setup the input buffer state to scan a string. The next call to yylex() will scan from a copy of str.
str | a NUL-terminated string to scan |
Definition at line 5319 of file php_lexer.c.
References yy_scan_bytes().
05320 { 05321 05322 return yy_scan_bytes(yy_str,strlen(yy_str) ); 05323 }
void yy_switch_to_buffer | ( | YY_BUFFER_STATE | new_buffer | ) |
Switch to a different input buffer.
new_buffer | The new input buffer. |
Definition at line 5035 of file php_lexer.c.
References yy_c_buf_p, YY_CURRENT_BUFFER, YY_CURRENT_BUFFER_LVALUE, yy_did_buffer_switch_on_eof, yy_hold_char, yy_load_buffer_state(), yy_n_chars, and yyensure_buffer_stack().
Referenced by yy_scan_buffer().
05036 { 05037 05038 /* TODO. We should be able to replace this entire function body 05039 * with 05040 * yypop_buffer_state(); 05041 * yypush_buffer_state(new_buffer); 05042 */ 05043 yyensure_buffer_stack (); 05044 if ( YY_CURRENT_BUFFER == new_buffer ) 05045 return; 05046 05047 if ( YY_CURRENT_BUFFER ) 05048 { 05049 /* Flush out information for old buffer. */ 05050 *(yy_c_buf_p) = (yy_hold_char); 05051 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); 05052 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); 05053 } 05054 05055 YY_CURRENT_BUFFER_LVALUE = new_buffer; 05056 yy_load_buffer_state( ); 05057 05058 /* We don't actually know whether we did this switch during 05059 * EOF (yywrap()) processing, but the only time this flag 05060 * is looked at is after yywrap() is called, so it's safe 05061 * to go ahead and always set it. 05062 */ 05063 (yy_did_buffer_switch_on_eof) = 1; 05064 }
static int yy_top_state | ( | void | ) | [static] |
Definition at line 5395 of file php_lexer.c.
05396 { 05397 return (yy_start_stack)[(yy_start_stack_ptr) - 1]; 05398 }
static yy_state_type yy_try_NUL_trans | ( | yy_state_type | current_state | ) | [static] |
Definition at line 4869 of file php_lexer.c.
References yy_c_buf_p.
Referenced by yylex().
04870 { 04871 register int yy_is_jam; 04872 register char *yy_cp = (yy_c_buf_p); 04873 04874 register YY_CHAR yy_c = 1; 04875 if ( yy_accept[yy_current_state] ) 04876 { 04877 (yy_last_accepting_state) = yy_current_state; 04878 (yy_last_accepting_cpos) = yy_cp; 04879 } 04880 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) 04881 { 04882 yy_current_state = (int) yy_def[yy_current_state]; 04883 if ( yy_current_state >= 1454 ) 04884 yy_c = yy_meta[(unsigned int) yy_c]; 04885 } 04886 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; 04887 yy_is_jam = (yy_current_state == 1453); 04888 04889 return yy_is_jam ? 0 : yy_current_state; 04890 }
Definition at line 5553 of file php_lexer.c.
Referenced by yy_create_buffer(), yy_push_state(), yy_scan_buffer(), yy_scan_bytes(), and yyensure_buffer_stack().
static void yyensure_buffer_stack | ( | void | ) | [static] |
Definition at line 5237 of file php_lexer.c.
References yy_buffer_stack_max, yy_buffer_stack_top, yyalloc(), and yyrealloc().
Referenced by yy_switch_to_buffer(), yylex(), yypush_buffer_state(), and yyrestart().
05238 { 05239 int num_to_alloc; 05240 05241 if (!(yy_buffer_stack)) { 05242 05243 /* First allocation is just for 2 elements, since we don't know if this 05244 * scanner will even need a stack. We use 2 instead of 1 to avoid an 05245 * immediate realloc on the next call. 05246 */ 05247 num_to_alloc = 1; 05248 (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc 05249 (num_to_alloc * sizeof(struct yy_buffer_state*) 05250 ); 05251 05252 memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); 05253 05254 (yy_buffer_stack_max) = num_to_alloc; 05255 (yy_buffer_stack_top) = 0; 05256 return; 05257 } 05258 05259 if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){ 05260 05261 /* Increase the buffer to prepare for a possible push. */ 05262 int grow_size = 8 /* arbitrary grow size */; 05263 05264 num_to_alloc = (yy_buffer_stack_max) + grow_size; 05265 (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc 05266 ((yy_buffer_stack), 05267 num_to_alloc * sizeof(struct yy_buffer_state*) 05268 ); 05269 05270 /* zero only the new slots.*/ 05271 memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*)); 05272 (yy_buffer_stack_max) = num_to_alloc; 05273 } 05274 }
void yyfree | ( | void * | ptr | ) |
Definition at line 5570 of file php_lexer.c.
Referenced by yy_delete_buffer(), and yylex_destroy().
int yyget_debug | ( | void | ) |
FILE* yyget_in | ( | void | ) |
Get the input stream.
Definition at line 5441 of file php_lexer.c.
References yyin.
05442 { 05443 return yyin; 05444 }
int yyget_leng | ( | void | ) |
Get the length of the current token.
Definition at line 5457 of file php_lexer.c.
References yyleng.
05458 { 05459 return yyleng; 05460 }
int yyget_lineno | ( | void | ) |
Get the current line number.
Definition at line 5432 of file php_lexer.c.
05433 { 05434 05435 return yylineno; 05436 }
FILE* yyget_out | ( | void | ) |
Get the output stream.
Definition at line 5449 of file php_lexer.c.
References yyout.
05450 { 05451 return yyout; 05452 }
char* yyget_text | ( | void | ) |
Get the current token.
Definition at line 5466 of file php_lexer.c.
05467 { 05468 return yytext; 05469 }
int yylex | ( | void | ) |
The main scanner function which does all the work.
Definition at line 3063 of file php_lexer.c.
References BEGIN, ECHO, EOB_ACT_CONTINUE_SCAN, EOB_ACT_END_OF_FILE, EOB_ACT_LAST_MATCH, INITIAL, ST_BACKQUOTE, ST_COMMENT, ST_DOC_COMMENT, ST_DOUBLE_QUOTES, ST_HEREDOC, ST_IN_SCRIPTING, ST_LOOKING_FOR_PROPERTY, ST_LOOKING_FOR_VARNAME, ST_ONE_LINE_COMMENT, ST_SINGLE_QUOTE, T_ABSTRACT, T_AFTER, T_AND_EQUAL, T_AROUND, T_ARRAY, T_ARRAY_CAST, T_AS, T_ASPECT, T_BAD_CHARACTER, T_BEFORE, T_BOOL_CAST, T_BOOLEAN_AND, T_BOOLEAN_OR, T_BREAK, T_CALL, T_CASE, T_CATCH, T_CHARACTER, T_CLASS, T_CLASS_C, T_CLONE, T_CONCAT_EQUAL, T_CONST, T_CONSTANT_ENCAPSED_STRING, T_CONTINUE, T_CURLY_OPEN, T_DEC, T_DECLARE, T_DEFAULT, T_DIV_EQUAL, T_DNUMBER, T_DO, T_DOLLAR_OPEN_CURLY_BRACES, T_DOUBLE_ARROW, T_DOUBLE_CAST, T_ECHO, T_ELSE, T_ELSEIF, T_EMPTY, T_ENCAPSED_AND_WHITESPACE, T_END_HEREDOC, T_ENDDECLARE, T_ENDFOR, T_ENDFOREACH, T_ENDIF, T_ENDSWITCH, T_ENDWHILE, T_EVAL, T_EXEC, T_EXIT, T_EXTENDS, T_FILE, T_FINAL, T_FOR, T_FOREACH, T_FUNC_C, T_FUNCTION, T_GET, T_GLOBAL, T_HALT_COMPILER, T_IF, T_IMPLEMENTS, T_INC, T_INCLUDE, T_INCLUDE_ONCE, T_INLINE_HTML, T_INSTANCEOF, T_INT_CAST, T_INTERFACE, T_IS_EQUAL, T_IS_GREATER_OR_EQUAL, T_IS_IDENTICAL, T_IS_NOT_EQUAL, T_IS_NOT_IDENTICAL, T_IS_SMALLER_OR_EQUAL, T_ISSET, T_LINE, T_LIST, T_LNUMBER, T_LOGICAL_AND, T_LOGICAL_OR, T_LOGICAL_XOR, T_METHOD_C, T_MINUS_EQUAL, T_MOD_EQUAL, T_MUL_EQUAL, T_NEW, T_NUM_STRING, T_OBJECT_CAST, T_OBJECT_OPERATOR, T_OR_EQUAL, T_PAAMAYIM_NEKUDOTAYIM, T_PLUS_EQUAL, T_POINTCUT, T_PRINT, T_PRIVATE, T_PROTECTED, T_PUBLIC, T_REQUIRE, T_REQUIRE_ONCE, T_RETURN, T_SET, T_SL, T_SL_EQUAL, T_SR, T_SR_EQUAL, T_START_HEREDOC, T_STATIC, T_STRING, T_STRING_CAST, T_STRING_VARNAME, T_SWITCH, T_THIS, T_THROW, T_TRY, T_UNSET, T_UNSET_CAST, T_USE, T_VAR, T_VARIABLE, T_WHILE, T_WITHIN, T_XOR_EQUAL, YY_AT_BOL, YY_BREAK, YY_BUF_SIZE, YY_BUFFER_NEW, YY_BUFFER_NORMAL, yy_c_buf_p, yy_create_buffer(), YY_CURRENT_BUFFER, YY_CURRENT_BUFFER_LVALUE, yy_did_buffer_switch_on_eof, YY_DO_BEFORE_ACTION, YY_END_OF_BUFFER, YY_FATAL_ERROR, yy_get_next_buffer(), yy_get_previous_state(), yy_hold_char, yy_init, yy_load_buffer_state(), YY_MORE_ADJ, yy_n_chars, YY_NEW_FILE, yy_pop_state(), yy_push_state(), YY_RESTORE_YY_MORE_OFFSET, YY_RULE_SETUP, YY_SC_TO_UI, YY_START, yy_start, YY_STATE_EOF, yy_try_NUL_trans(), yyensure_buffer_stack(), yyin, yyleng, yyless, yymore, yyout, YYSTATE, yyterminate, yytext_ptr, and yywrap.
03064 { 03065 register yy_state_type yy_current_state; 03066 register char *yy_cp, *yy_bp; 03067 register int yy_act; 03068 03069 #line 68 "php_lexer.l" 03070 03071 03072 #line 3073 "php_lexer.c" 03073 03074 if ( (yy_init) ) 03075 { 03076 (yy_init) = 0; 03077 03078 #ifdef YY_USER_INIT 03079 YY_USER_INIT; 03080 #endif 03081 03082 if ( ! (yy_start) ) 03083 (yy_start) = 1; /* first start state */ 03084 03085 if ( ! yyin ) 03086 yyin = stdin; 03087 03088 if ( ! yyout ) 03089 yyout = stdout; 03090 03091 if ( ! YY_CURRENT_BUFFER ) { 03092 yyensure_buffer_stack (); 03093 YY_CURRENT_BUFFER_LVALUE = 03094 yy_create_buffer(yyin,YY_BUF_SIZE ); 03095 } 03096 03097 yy_load_buffer_state( ); 03098 } 03099 03100 while ( 1 ) /* loops until end-of-file is reached */ 03101 { 03102 (yy_more_len) = 0; 03103 if ( (yy_more_flag) ) 03104 { 03105 (yy_more_len) = (yy_c_buf_p) - (yytext_ptr); 03106 (yy_more_flag) = 0; 03107 } 03108 yy_cp = (yy_c_buf_p); 03109 03110 /* Support of yytext. */ 03111 *yy_cp = (yy_hold_char); 03112 03113 /* yy_bp points to the position in yy_ch_buf of the start of 03114 * the current run. 03115 */ 03116 yy_bp = yy_cp; 03117 03118 yy_current_state = (yy_start); 03119 yy_current_state += YY_AT_BOL(); 03120 yy_match: 03121 do 03122 { 03123 register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; 03124 if ( yy_accept[yy_current_state] ) 03125 { 03126 (yy_last_accepting_state) = yy_current_state; 03127 (yy_last_accepting_cpos) = yy_cp; 03128 } 03129 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) 03130 { 03131 yy_current_state = (int) yy_def[yy_current_state]; 03132 if ( yy_current_state >= 1454 ) 03133 yy_c = yy_meta[(unsigned int) yy_c]; 03134 } 03135 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; 03136 ++yy_cp; 03137 } 03138 while ( yy_base[yy_current_state] != 8120 ); 03139 03140 yy_find_action: 03141 yy_act = yy_accept[yy_current_state]; 03142 if ( yy_act == 0 ) 03143 { /* have to back up */ 03144 yy_cp = (yy_last_accepting_cpos); 03145 yy_current_state = (yy_last_accepting_state); 03146 yy_act = yy_accept[yy_current_state]; 03147 } 03148 03149 YY_DO_BEFORE_ACTION; 03150 03151 if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] ) 03152 { 03153 int yyl; 03154 for ( yyl = (yy_more_len); yyl < yyleng; ++yyl ) 03155 if ( yytext[yyl] == '\n' ) 03156 03157 yylineno++; 03158 ; 03159 } 03160 03161 do_action: /* This label is used only to access EOF actions. */ 03162 03163 switch ( yy_act ) 03164 { /* beginning of action switch */ 03165 case 0: /* must back up */ 03166 /* undo the effects of YY_DO_BEFORE_ACTION */ 03167 *yy_cp = (yy_hold_char); 03168 yy_cp = (yy_last_accepting_cpos); 03169 yy_current_state = (yy_last_accepting_state); 03170 goto yy_find_action; 03171 03172 case 1: 03173 YY_RULE_SETUP 03174 #line 70 "php_lexer.l" 03175 { 03176 return T_EXIT; 03177 } 03178 YY_BREAK 03179 case 2: 03180 YY_RULE_SETUP 03181 #line 74 "php_lexer.l" 03182 { 03183 return T_EXIT; 03184 } 03185 YY_BREAK 03186 case 3: 03187 YY_RULE_SETUP 03188 #line 78 "php_lexer.l" 03189 { 03190 return T_FUNCTION; 03191 } 03192 YY_BREAK 03193 case 4: 03194 YY_RULE_SETUP 03195 #line 82 "php_lexer.l" 03196 { 03197 return T_CONST; 03198 } 03199 YY_BREAK 03200 case 5: 03201 YY_RULE_SETUP 03202 #line 86 "php_lexer.l" 03203 { 03204 return T_RETURN; 03205 } 03206 YY_BREAK 03207 case 6: 03208 YY_RULE_SETUP 03209 #line 90 "php_lexer.l" 03210 { 03211 return T_TRY; 03212 } 03213 YY_BREAK 03214 case 7: 03215 YY_RULE_SETUP 03216 #line 94 "php_lexer.l" 03217 { 03218 return T_CATCH; 03219 } 03220 YY_BREAK 03221 case 8: 03222 YY_RULE_SETUP 03223 #line 98 "php_lexer.l" 03224 { 03225 return T_THROW; 03226 } 03227 YY_BREAK 03228 case 9: 03229 YY_RULE_SETUP 03230 #line 102 "php_lexer.l" 03231 { 03232 return T_IF; 03233 } 03234 YY_BREAK 03235 case 10: 03236 YY_RULE_SETUP 03237 #line 106 "php_lexer.l" 03238 { 03239 return T_ELSEIF; 03240 } 03241 YY_BREAK 03242 case 11: 03243 YY_RULE_SETUP 03244 #line 110 "php_lexer.l" 03245 { 03246 return T_ENDIF; 03247 } 03248 YY_BREAK 03249 case 12: 03250 YY_RULE_SETUP 03251 #line 114 "php_lexer.l" 03252 { 03253 return T_ELSE; 03254 } 03255 YY_BREAK 03256 case 13: 03257 YY_RULE_SETUP 03258 #line 118 "php_lexer.l" 03259 { 03260 return T_WHILE; 03261 } 03262 YY_BREAK 03263 case 14: 03264 YY_RULE_SETUP 03265 #line 122 "php_lexer.l" 03266 { 03267 return T_ENDWHILE; 03268 } 03269 YY_BREAK 03270 case 15: 03271 YY_RULE_SETUP 03272 #line 126 "php_lexer.l" 03273 { 03274 return T_DO; 03275 } 03276 YY_BREAK 03277 case 16: 03278 YY_RULE_SETUP 03279 #line 130 "php_lexer.l" 03280 { 03281 return T_FOR; 03282 } 03283 YY_BREAK 03284 case 17: 03285 YY_RULE_SETUP 03286 #line 134 "php_lexer.l" 03287 { 03288 return T_ENDFOR; 03289 } 03290 YY_BREAK 03291 case 18: 03292 YY_RULE_SETUP 03293 #line 138 "php_lexer.l" 03294 { 03295 return T_FOREACH; 03296 } 03297 YY_BREAK 03298 case 19: 03299 YY_RULE_SETUP 03300 #line 142 "php_lexer.l" 03301 { 03302 return T_ENDFOREACH; 03303 } 03304 YY_BREAK 03305 case 20: 03306 YY_RULE_SETUP 03307 #line 146 "php_lexer.l" 03308 { 03309 return T_DECLARE; 03310 } 03311 YY_BREAK 03312 case 21: 03313 YY_RULE_SETUP 03314 #line 150 "php_lexer.l" 03315 { 03316 return T_ENDDECLARE; 03317 } 03318 YY_BREAK 03319 case 22: 03320 YY_RULE_SETUP 03321 #line 154 "php_lexer.l" 03322 { 03323 return T_INSTANCEOF; 03324 } 03325 YY_BREAK 03326 case 23: 03327 YY_RULE_SETUP 03328 #line 158 "php_lexer.l" 03329 { 03330 return T_AS; 03331 } 03332 YY_BREAK 03333 case 24: 03334 YY_RULE_SETUP 03335 #line 162 "php_lexer.l" 03336 { 03337 return T_SWITCH; 03338 } 03339 YY_BREAK 03340 case 25: 03341 YY_RULE_SETUP 03342 #line 166 "php_lexer.l" 03343 { 03344 return T_ENDSWITCH; 03345 } 03346 YY_BREAK 03347 case 26: 03348 YY_RULE_SETUP 03349 #line 170 "php_lexer.l" 03350 { 03351 return T_CASE; 03352 } 03353 YY_BREAK 03354 case 27: 03355 YY_RULE_SETUP 03356 #line 174 "php_lexer.l" 03357 { 03358 return T_DEFAULT; 03359 } 03360 YY_BREAK 03361 case 28: 03362 YY_RULE_SETUP 03363 #line 178 "php_lexer.l" 03364 { 03365 return T_BREAK; 03366 } 03367 YY_BREAK 03368 case 29: 03369 YY_RULE_SETUP 03370 #line 182 "php_lexer.l" 03371 { 03372 return T_CONTINUE; 03373 } 03374 YY_BREAK 03375 case 30: 03376 YY_RULE_SETUP 03377 #line 186 "php_lexer.l" 03378 { 03379 return T_ECHO; 03380 } 03381 YY_BREAK 03382 case 31: 03383 YY_RULE_SETUP 03384 #line 190 "php_lexer.l" 03385 { 03386 return T_PRINT; 03387 } 03388 YY_BREAK 03389 case 32: 03390 YY_RULE_SETUP 03391 #line 194 "php_lexer.l" 03392 { 03393 return T_CLASS; 03394 } 03395 YY_BREAK 03396 case 33: 03397 YY_RULE_SETUP 03398 #line 198 "php_lexer.l" 03399 { 03400 /* added by William Candillon <wcandillon@php.net> */ 03401 return T_ASPECT; 03402 } 03403 YY_BREAK 03404 case 34: 03405 YY_RULE_SETUP 03406 #line 203 "php_lexer.l" 03407 { 03408 /* added by William Candillon <wcandillon@php.net> */ 03409 return T_BEFORE; 03410 } 03411 YY_BREAK 03412 case 35: 03413 YY_RULE_SETUP 03414 #line 208 "php_lexer.l" 03415 { 03416 /* added by William Candillon <wcandillon@php.net> */ 03417 return T_AROUND; 03418 } 03419 YY_BREAK 03420 case 36: 03421 YY_RULE_SETUP 03422 #line 213 "php_lexer.l" 03423 { 03424 /* added by William Candillon <wcandillon@php.net> */ 03425 return T_AFTER; 03426 } 03427 YY_BREAK 03428 case 37: 03429 YY_RULE_SETUP 03430 #line 218 "php_lexer.l" 03431 { 03432 /* added by William Candillon <wcandillon@php.net> */ 03433 return T_POINTCUT; 03434 } 03435 YY_BREAK 03436 case 38: 03437 YY_RULE_SETUP 03438 #line 223 "php_lexer.l" 03439 { 03440 /* added by William Candillon <wcandillon@php.net> */ 03441 return T_EXEC; 03442 } 03443 YY_BREAK 03444 case 39: 03445 YY_RULE_SETUP 03446 #line 228 "php_lexer.l" 03447 { 03448 /* added by William Candillon <wcandillon@php.net> */ 03449 return T_CALL; 03450 } 03451 YY_BREAK 03452 case 40: 03453 YY_RULE_SETUP 03454 #line 233 "php_lexer.l" 03455 { 03456 /* added by William Candillon <wcandillon@php.net> */ 03457 return T_SET; 03458 } 03459 YY_BREAK 03460 case 41: 03461 YY_RULE_SETUP 03462 #line 238 "php_lexer.l" 03463 { 03464 /* added by William Candillon <wcandillon@php.net> */ 03465 return T_GET; 03466 } 03467 YY_BREAK 03468 case 42: 03469 YY_RULE_SETUP 03470 #line 243 "php_lexer.l" 03471 { 03472 /* added by William Candillon <wcandillon@php.net> */ 03473 return T_THIS; 03474 } 03475 YY_BREAK 03476 case 43: 03477 YY_RULE_SETUP 03478 #line 248 "php_lexer.l" 03479 { 03480 /* added by William Candillon <wcandillon@php.net> */ 03481 return T_WITHIN; 03482 } 03483 YY_BREAK 03484 case 44: 03485 YY_RULE_SETUP 03486 #line 253 "php_lexer.l" 03487 { 03488 /* added by William Candillon <wcandillon@php.net> */ 03489 return T_FILE; 03490 } 03491 YY_BREAK 03492 case 45: 03493 YY_RULE_SETUP 03494 #line 258 "php_lexer.l" 03495 { 03496 return T_INTERFACE; 03497 } 03498 YY_BREAK 03499 case 46: 03500 YY_RULE_SETUP 03501 #line 262 "php_lexer.l" 03502 { 03503 return T_EXTENDS; 03504 } 03505 YY_BREAK 03506 case 47: 03507 YY_RULE_SETUP 03508 #line 266 "php_lexer.l" 03509 { 03510 return T_IMPLEMENTS; 03511 } 03512 YY_BREAK 03513 case 48: 03514 YY_RULE_SETUP 03515 #line 270 "php_lexer.l" 03516 { 03517 yy_push_state(ST_LOOKING_FOR_PROPERTY); 03518 return T_OBJECT_OPERATOR; 03519 } 03520 YY_BREAK 03521 case 49: 03522 YY_RULE_SETUP 03523 #line 275 "php_lexer.l" 03524 { 03525 yy_pop_state(); 03526 return T_STRING; 03527 } 03528 YY_BREAK 03529 case 50: 03530 /* rule 50 can match eol */ 03531 YY_RULE_SETUP 03532 #line 280 "php_lexer.l" 03533 { 03534 yyless(0); 03535 yy_pop_state(); 03536 } 03537 YY_BREAK 03538 case 51: 03539 YY_RULE_SETUP 03540 #line 285 "php_lexer.l" 03541 { 03542 return T_PAAMAYIM_NEKUDOTAYIM; 03543 } 03544 YY_BREAK 03545 case 52: 03546 YY_RULE_SETUP 03547 #line 289 "php_lexer.l" 03548 { 03549 return T_NEW; 03550 } 03551 YY_BREAK 03552 case 53: 03553 YY_RULE_SETUP 03554 #line 293 "php_lexer.l" 03555 { 03556 return T_CLONE; 03557 } 03558 YY_BREAK 03559 case 54: 03560 YY_RULE_SETUP 03561 #line 297 "php_lexer.l" 03562 { 03563 return T_VAR; 03564 } 03565 YY_BREAK 03566 case 55: 03567 YY_RULE_SETUP 03568 #line 301 "php_lexer.l" 03569 { 03570 return T_INT_CAST; 03571 } 03572 YY_BREAK 03573 case 56: 03574 YY_RULE_SETUP 03575 #line 305 "php_lexer.l" 03576 { 03577 return T_DOUBLE_CAST; 03578 } 03579 YY_BREAK 03580 case 57: 03581 YY_RULE_SETUP 03582 #line 309 "php_lexer.l" 03583 { 03584 return T_STRING_CAST; 03585 } 03586 YY_BREAK 03587 case 58: 03588 YY_RULE_SETUP 03589 #line 313 "php_lexer.l" 03590 { 03591 return T_ARRAY_CAST; 03592 } 03593 YY_BREAK 03594 case 59: 03595 YY_RULE_SETUP 03596 #line 317 "php_lexer.l" 03597 { 03598 return T_OBJECT_CAST; 03599 } 03600 YY_BREAK 03601 case 60: 03602 YY_RULE_SETUP 03603 #line 321 "php_lexer.l" 03604 { 03605 return T_BOOL_CAST; 03606 } 03607 YY_BREAK 03608 case 61: 03609 YY_RULE_SETUP 03610 #line 325 "php_lexer.l" 03611 { 03612 return T_UNSET_CAST; 03613 } 03614 YY_BREAK 03615 case 62: 03616 YY_RULE_SETUP 03617 #line 329 "php_lexer.l" 03618 { 03619 return T_EVAL; 03620 } 03621 YY_BREAK 03622 case 63: 03623 YY_RULE_SETUP 03624 #line 333 "php_lexer.l" 03625 { 03626 return T_INCLUDE; 03627 } 03628 YY_BREAK 03629 case 64: 03630 YY_RULE_SETUP 03631 #line 337 "php_lexer.l" 03632 { 03633 return T_INCLUDE_ONCE; 03634 } 03635 YY_BREAK 03636 case 65: 03637 YY_RULE_SETUP 03638 #line 341 "php_lexer.l" 03639 { 03640 return T_REQUIRE; 03641 } 03642 YY_BREAK 03643 case 66: 03644 YY_RULE_SETUP 03645 #line 345 "php_lexer.l" 03646 { 03647 return T_REQUIRE_ONCE; 03648 } 03649 YY_BREAK 03650 case 67: 03651 YY_RULE_SETUP 03652 #line 349 "php_lexer.l" 03653 { 03654 return T_USE; 03655 } 03656 YY_BREAK 03657 case 68: 03658 YY_RULE_SETUP 03659 #line 353 "php_lexer.l" 03660 { 03661 return T_GLOBAL; 03662 } 03663 YY_BREAK 03664 case 69: 03665 YY_RULE_SETUP 03666 #line 357 "php_lexer.l" 03667 { 03668 return T_ISSET; 03669 } 03670 YY_BREAK 03671 case 70: 03672 YY_RULE_SETUP 03673 #line 361 "php_lexer.l" 03674 { 03675 return T_EMPTY; 03676 } 03677 YY_BREAK 03678 case 71: 03679 YY_RULE_SETUP 03680 #line 365 "php_lexer.l" 03681 { 03682 return T_HALT_COMPILER; 03683 } 03684 YY_BREAK 03685 case 72: 03686 YY_RULE_SETUP 03687 #line 369 "php_lexer.l" 03688 { 03689 return T_STATIC; 03690 } 03691 YY_BREAK 03692 case 73: 03693 YY_RULE_SETUP 03694 #line 373 "php_lexer.l" 03695 { 03696 return T_ABSTRACT; 03697 } 03698 YY_BREAK 03699 case 74: 03700 YY_RULE_SETUP 03701 #line 377 "php_lexer.l" 03702 { 03703 return T_FINAL; 03704 } 03705 YY_BREAK 03706 case 75: 03707 YY_RULE_SETUP 03708 #line 381 "php_lexer.l" 03709 { 03710 return T_PRIVATE; 03711 } 03712 YY_BREAK 03713 case 76: 03714 YY_RULE_SETUP 03715 #line 385 "php_lexer.l" 03716 { 03717 return T_PROTECTED; 03718 } 03719 YY_BREAK 03720 case 77: 03721 YY_RULE_SETUP 03722 #line 389 "php_lexer.l" 03723 { 03724 return T_PUBLIC; 03725 } 03726 YY_BREAK 03727 case 78: 03728 YY_RULE_SETUP 03729 #line 393 "php_lexer.l" 03730 { 03731 return T_UNSET; 03732 } 03733 YY_BREAK 03734 case 79: 03735 YY_RULE_SETUP 03736 #line 397 "php_lexer.l" 03737 { 03738 return T_DOUBLE_ARROW; 03739 } 03740 YY_BREAK 03741 case 80: 03742 YY_RULE_SETUP 03743 #line 401 "php_lexer.l" 03744 { 03745 return T_LIST; 03746 } 03747 YY_BREAK 03748 case 81: 03749 YY_RULE_SETUP 03750 #line 405 "php_lexer.l" 03751 { 03752 return T_ARRAY; 03753 } 03754 YY_BREAK 03755 case 82: 03756 YY_RULE_SETUP 03757 #line 409 "php_lexer.l" 03758 { 03759 return T_INC; 03760 } 03761 YY_BREAK 03762 case 83: 03763 YY_RULE_SETUP 03764 #line 413 "php_lexer.l" 03765 { 03766 return T_DEC; 03767 } 03768 YY_BREAK 03769 case 84: 03770 YY_RULE_SETUP 03771 #line 417 "php_lexer.l" 03772 { 03773 return T_IS_IDENTICAL; 03774 } 03775 YY_BREAK 03776 case 85: 03777 YY_RULE_SETUP 03778 #line 421 "php_lexer.l" 03779 { 03780 return T_IS_NOT_IDENTICAL; 03781 } 03782 YY_BREAK 03783 case 86: 03784 YY_RULE_SETUP 03785 #line 425 "php_lexer.l" 03786 { 03787 return T_IS_EQUAL; 03788 } 03789 YY_BREAK 03790 case 87: 03791 YY_RULE_SETUP 03792 #line 429 "php_lexer.l" 03793 { 03794 return T_IS_NOT_EQUAL; 03795 } 03796 YY_BREAK 03797 case 88: 03798 YY_RULE_SETUP 03799 #line 433 "php_lexer.l" 03800 { 03801 return T_IS_SMALLER_OR_EQUAL; 03802 } 03803 YY_BREAK 03804 case 89: 03805 YY_RULE_SETUP 03806 #line 437 "php_lexer.l" 03807 { 03808 return T_IS_GREATER_OR_EQUAL; 03809 } 03810 YY_BREAK 03811 case 90: 03812 YY_RULE_SETUP 03813 #line 441 "php_lexer.l" 03814 { 03815 return T_PLUS_EQUAL; 03816 } 03817 YY_BREAK 03818 case 91: 03819 YY_RULE_SETUP 03820 #line 445 "php_lexer.l" 03821 { 03822 return T_MINUS_EQUAL; 03823 } 03824 YY_BREAK 03825 case 92: 03826 YY_RULE_SETUP 03827 #line 449 "php_lexer.l" 03828 { 03829 return T_MUL_EQUAL; 03830 } 03831 YY_BREAK 03832 case 93: 03833 YY_RULE_SETUP 03834 #line 453 "php_lexer.l" 03835 { 03836 return T_DIV_EQUAL; 03837 } 03838 YY_BREAK 03839 case 94: 03840 YY_RULE_SETUP 03841 #line 457 "php_lexer.l" 03842 { 03843 return T_CONCAT_EQUAL; 03844 } 03845 YY_BREAK 03846 case 95: 03847 YY_RULE_SETUP 03848 #line 461 "php_lexer.l" 03849 { 03850 return T_MOD_EQUAL; 03851 } 03852 YY_BREAK 03853 case 96: 03854 YY_RULE_SETUP 03855 #line 465 "php_lexer.l" 03856 { 03857 return T_SL_EQUAL; 03858 } 03859 YY_BREAK 03860 case 97: 03861 YY_RULE_SETUP 03862 #line 469 "php_lexer.l" 03863 { 03864 return T_SR_EQUAL; 03865 } 03866 YY_BREAK 03867 case 98: 03868 YY_RULE_SETUP 03869 #line 473 "php_lexer.l" 03870 { 03871 return T_AND_EQUAL; 03872 } 03873 YY_BREAK 03874 case 99: 03875 YY_RULE_SETUP 03876 #line 477 "php_lexer.l" 03877 { 03878 return T_OR_EQUAL; 03879 } 03880 YY_BREAK 03881 case 100: 03882 YY_RULE_SETUP 03883 #line 481 "php_lexer.l" 03884 { 03885 return T_XOR_EQUAL; 03886 } 03887 YY_BREAK 03888 case 101: 03889 YY_RULE_SETUP 03890 #line 485 "php_lexer.l" 03891 { 03892 return T_BOOLEAN_OR; 03893 } 03894 YY_BREAK 03895 case 102: 03896 YY_RULE_SETUP 03897 #line 489 "php_lexer.l" 03898 { 03899 return T_BOOLEAN_AND; 03900 } 03901 YY_BREAK 03902 case 103: 03903 YY_RULE_SETUP 03904 #line 493 "php_lexer.l" 03905 { 03906 return T_LOGICAL_OR; 03907 } 03908 YY_BREAK 03909 case 104: 03910 YY_RULE_SETUP 03911 #line 497 "php_lexer.l" 03912 { 03913 return T_LOGICAL_AND; 03914 } 03915 YY_BREAK 03916 case 105: 03917 YY_RULE_SETUP 03918 #line 501 "php_lexer.l" 03919 { 03920 return T_LOGICAL_XOR; 03921 } 03922 YY_BREAK 03923 case 106: 03924 YY_RULE_SETUP 03925 #line 505 "php_lexer.l" 03926 { 03927 return T_SL; 03928 } 03929 YY_BREAK 03930 case 107: 03931 YY_RULE_SETUP 03932 #line 509 "php_lexer.l" 03933 { 03934 return T_SR; 03935 } 03936 YY_BREAK 03937 case 108: 03938 YY_RULE_SETUP 03939 #line 513 "php_lexer.l" 03940 { 03941 return yytext[0]; 03942 } 03943 YY_BREAK 03944 case 109: 03945 YY_RULE_SETUP 03946 #line 518 "php_lexer.l" 03947 { 03948 yy_push_state(ST_IN_SCRIPTING); 03949 return '{'; 03950 } 03951 YY_BREAK 03952 case 110: 03953 YY_RULE_SETUP 03954 #line 524 "php_lexer.l" 03955 { 03956 yy_push_state(ST_LOOKING_FOR_VARNAME); 03957 return T_DOLLAR_OPEN_CURLY_BRACES; 03958 } 03959 YY_BREAK 03960 case 111: 03961 YY_RULE_SETUP 03962 #line 530 "php_lexer.l" 03963 { 03964 /* This is a temporary fix which is dependant on flex and it's implementation */ 03965 if (yy_start_stack_ptr) { 03966 yy_pop_state(); 03967 } 03968 return '}'; 03969 } 03970 YY_BREAK 03971 case 112: 03972 YY_RULE_SETUP 03973 #line 539 "php_lexer.l" 03974 { 03975 yy_pop_state(); 03976 yy_push_state(ST_IN_SCRIPTING); 03977 return T_STRING_VARNAME; 03978 } 03979 YY_BREAK 03980 case 113: 03981 /* rule 113 can match eol */ 03982 YY_RULE_SETUP 03983 #line 546 "php_lexer.l" 03984 { 03985 yyless(0); 03986 yy_pop_state(); 03987 yy_push_state(ST_IN_SCRIPTING); 03988 } 03989 YY_BREAK 03990 case 114: 03991 YY_RULE_SETUP 03992 #line 553 "php_lexer.l" 03993 { 03994 return T_LNUMBER; 03995 } 03996 YY_BREAK 03997 case 115: 03998 YY_RULE_SETUP 03999 #line 557 "php_lexer.l" 04000 { 04001 return T_LNUMBER; 04002 } 04003 YY_BREAK 04004 case 116: 04005 YY_RULE_SETUP 04006 #line 561 "php_lexer.l" 04007 { /* treat numbers (almost) as strings inside encapsulated strings */ 04008 return T_NUM_STRING; 04009 } 04010 YY_BREAK 04011 case 117: 04012 YY_RULE_SETUP 04013 #line 565 "php_lexer.l" 04014 { 04015 return T_DNUMBER; 04016 } 04017 YY_BREAK 04018 case 118: 04019 YY_RULE_SETUP 04020 #line 569 "php_lexer.l" 04021 { 04022 return T_CLASS_C; 04023 } 04024 YY_BREAK 04025 case 119: 04026 YY_RULE_SETUP 04027 #line 573 "php_lexer.l" 04028 { 04029 return T_FUNC_C; 04030 } 04031 YY_BREAK 04032 case 120: 04033 YY_RULE_SETUP 04034 #line 577 "php_lexer.l" 04035 { 04036 return T_METHOD_C; 04037 } 04038 YY_BREAK 04039 case 121: 04040 YY_RULE_SETUP 04041 #line 581 "php_lexer.l" 04042 { 04043 return T_LINE; 04044 } 04045 YY_BREAK 04046 case 122: 04047 YY_RULE_SETUP 04048 #line 585 "php_lexer.l" 04049 { 04050 return T_FILE; 04051 } 04052 YY_BREAK 04053 case 123: 04054 /* rule 123 can match eol */ 04055 YY_RULE_SETUP 04056 #line 589 "php_lexer.l" 04057 { 04058 return T_INLINE_HTML; 04059 } 04060 YY_BREAK 04061 case 124: 04062 /* rule 124 can match eol */ 04063 YY_RULE_SETUP 04064 #line 593 "php_lexer.l" 04065 { 04066 if (short_tags || yyleng>2) { /* yyleng>2 means it's not <? but <script> */ 04067 /* no copying - intentional */ 04068 BEGIN(ST_IN_SCRIPTING); 04069 //return T_OPEN_TAG; 04070 } else { 04071 return T_INLINE_HTML; 04072 } 04073 } 04074 YY_BREAK 04075 case 125: 04076 YY_RULE_SETUP 04077 #line 603 "php_lexer.l" 04078 { 04079 if ((yytext[1]=='%' && asp_tags) || (yytext[1]=='?' && short_tags)) { 04080 BEGIN(ST_IN_SCRIPTING); 04081 //return T_OPEN_TAG_WITH_ECHO; 04082 //return T_ECHO; 04083 } else { 04084 return T_INLINE_HTML; 04085 } 04086 } 04087 YY_BREAK 04088 case 126: 04089 YY_RULE_SETUP 04090 #line 614 "php_lexer.l" 04091 { 04092 if(asp_tags){ 04093 BEGIN(ST_IN_SCRIPTING); 04094 //return T_OPEN_TAG; 04095 } else { 04096 return T_INLINE_HTML; 04097 } 04098 } 04099 YY_BREAK 04100 case 127: 04101 /* rule 127 can match eol */ 04102 YY_RULE_SETUP 04103 #line 623 "php_lexer.l" 04104 { 04105 BEGIN(ST_IN_SCRIPTING); 04106 //return T_OPEN_TAG; 04107 } 04108 YY_BREAK 04109 case 128: 04110 YY_RULE_SETUP 04111 #line 628 "php_lexer.l" 04112 { 04113 return T_VARIABLE; 04114 } 04115 YY_BREAK 04116 case 129: 04117 YY_RULE_SETUP 04118 #line 632 "php_lexer.l" 04119 { 04120 return T_STRING; 04121 } 04122 YY_BREAK 04123 case 130: 04124 YY_RULE_SETUP 04125 #line 636 "php_lexer.l" 04126 { 04127 return T_STRING; 04128 } 04129 YY_BREAK 04130 case 131: 04131 /* rule 131 can match eol */ 04132 YY_RULE_SETUP 04133 #line 641 "php_lexer.l" 04134 { 04135 //return T_WHITESPACE; 04136 } 04137 YY_BREAK 04138 case 132: 04139 YY_RULE_SETUP 04140 #line 646 "php_lexer.l" 04141 { 04142 BEGIN(ST_ONE_LINE_COMMENT); 04143 yymore(); 04144 } 04145 YY_BREAK 04146 case 133: 04147 YY_RULE_SETUP 04148 #line 651 "php_lexer.l" 04149 { 04150 yymore(); 04151 } 04152 YY_BREAK 04153 case 134: 04154 /* rule 134 can match eol */ 04155 YY_RULE_SETUP 04156 #line 655 "php_lexer.l" 04157 { 04158 switch (yytext[yyleng-1]) { 04159 case '?': case '%': case '>': 04160 yyless(yyleng-1); 04161 yymore(); 04162 break; 04163 case '\n': 04164 lineno++; 04165 /* intentional fall through */ 04166 default: 04167 BEGIN(ST_IN_SCRIPTING); 04168 //return T_COMMENT; 04169 } 04170 } 04171 YY_BREAK 04172 case 135: 04173 /* rule 135 can match eol */ 04174 YY_RULE_SETUP 04175 #line 670 "php_lexer.l" 04176 { 04177 BEGIN(ST_IN_SCRIPTING); 04178 lineno++; 04179 //return T_COMMENT; 04180 } 04181 YY_BREAK 04182 case 136: 04183 YY_RULE_SETUP 04184 #line 676 "php_lexer.l" 04185 { 04186 if (asp_tags || yytext[yyleng-2] != '%') { /* asp comment? */ 04187 yyless(yyleng-2); 04188 BEGIN(ST_IN_SCRIPTING); 04189 //return T_COMMENT; 04190 } else { 04191 yymore(); 04192 } 04193 } 04194 YY_BREAK 04195 case 137: 04196 /* rule 137 can match eol */ 04197 YY_RULE_SETUP 04198 #line 686 "php_lexer.l" 04199 { 04200 comment_start_line = lineno; 04201 BEGIN(ST_DOC_COMMENT); 04202 yymore(); 04203 } 04204 YY_BREAK 04205 case 138: 04206 YY_RULE_SETUP 04207 #line 692 "php_lexer.l" 04208 { 04209 comment_start_line = lineno; 04210 BEGIN(ST_COMMENT); 04211 yymore(); 04212 } 04213 YY_BREAK 04214 case 139: 04215 /* rule 139 can match eol */ 04216 YY_RULE_SETUP 04217 #line 699 "php_lexer.l" 04218 { 04219 yymore(); 04220 } 04221 YY_BREAK 04222 case 140: 04223 YY_RULE_SETUP 04224 #line 703 "php_lexer.l" 04225 { 04226 BEGIN(ST_IN_SCRIPTING); 04227 //return T_DOC_COMMENT; 04228 } 04229 YY_BREAK 04230 case 141: 04231 YY_RULE_SETUP 04232 #line 708 "php_lexer.l" 04233 { 04234 BEGIN(ST_IN_SCRIPTING); 04235 //return T_COMMENT; 04236 } 04237 YY_BREAK 04238 case 142: 04239 YY_RULE_SETUP 04240 #line 713 "php_lexer.l" 04241 { 04242 yymore(); 04243 } 04244 YY_BREAK 04245 case 143: 04246 /* rule 143 can match eol */ 04247 YY_RULE_SETUP 04248 #line 717 "php_lexer.l" 04249 { 04250 BEGIN(INITIAL); 04251 //return T_CLOSE_TAG; /* implicit ';' at php-end tag */ 04252 } 04253 YY_BREAK 04254 case 144: 04255 /* rule 144 can match eol */ 04256 YY_RULE_SETUP 04257 #line 723 "php_lexer.l" 04258 { 04259 if (asp_tags) { 04260 BEGIN(INITIAL); 04261 //return T_CLOSE_TAG; /* implicit ';' at php-end tag */ 04262 } else { 04263 yyless(1); 04264 return yytext[0]; 04265 } 04266 } 04267 YY_BREAK 04268 case 145: 04269 /* rule 145 can match eol */ 04270 YY_RULE_SETUP 04271 #line 734 "php_lexer.l" 04272 { 04273 /*register char *s, *t; 04274 char *end; 04275 convert escape sequences 04276 s = t = estrndup(yytext+1, yyleng-2);; 04277 end = s+yyleng-2;*/ 04278 return T_CONSTANT_ENCAPSED_STRING; 04279 } 04280 YY_BREAK 04281 case 146: 04282 /* rule 146 can match eol */ 04283 YY_RULE_SETUP 04284 #line 744 "php_lexer.l" 04285 { 04286 04287 register char *s, *t; 04288 char *end; 04289 04290 04291 /* convert escape sequences 04292 s = t = estrndup(yytext+1, yyleng-2); 04293 end = s+yyleng-2; 04294 while (s<end) { 04295 if (*s=='\\') { 04296 s++; 04297 if (s>=end) { 04298 continue; 04299 } 04300 switch(*s) { 04301 case '\\': 04302 case '\'': 04303 *t++ = *s; 04304 end--; 04305 break; 04306 default: 04307 *t++ = '\\'; 04308 *t++ = *s; 04309 break; 04310 } 04311 s++; 04312 } else { 04313 *t++ = *s++; 04314 } 04315 } 04316 *t = 0; 04317 */ 04318 return T_CONSTANT_ENCAPSED_STRING; 04319 } 04320 YY_BREAK 04321 case 147: 04322 YY_RULE_SETUP 04323 #line 781 "php_lexer.l" 04324 { 04325 BEGIN(ST_DOUBLE_QUOTES); 04326 return '\"'; 04327 } 04328 YY_BREAK 04329 case 148: 04330 /* rule 148 can match eol */ 04331 YY_RULE_SETUP 04332 #line 787 "php_lexer.l" 04333 { 04334 BEGIN(ST_HEREDOC); 04335 return T_START_HEREDOC; 04336 } 04337 YY_BREAK 04338 case 149: 04339 YY_RULE_SETUP 04340 #line 793 "php_lexer.l" 04341 { 04342 BEGIN(ST_BACKQUOTE); 04343 return '`'; 04344 } 04345 YY_BREAK 04346 case 150: 04347 YY_RULE_SETUP 04348 #line 799 "php_lexer.l" 04349 { 04350 BEGIN(ST_SINGLE_QUOTE); 04351 return '\''; 04352 } 04353 YY_BREAK 04354 case 151: 04355 /* rule 151 can match eol */ 04356 YY_RULE_SETUP 04357 #line 805 "php_lexer.l" 04358 { 04359 int label_len; 04360 04361 lineno++; 04362 if (yytext[yyleng-2]=='\r') { 04363 label_len = yyleng-2; 04364 } else { 04365 label_len = yyleng-1; 04366 } 04367 04368 if (yytext[label_len-1]==';') { 04369 label_len--; 04370 } 04371 04372 if (label_len==heredoc_len && !memcmp(yytext, heredoc, label_len)) { 04373 yyless(yyleng - (yyleng - label_len)); 04374 BEGIN(ST_IN_SCRIPTING); 04375 return T_END_HEREDOC; 04376 } else { 04377 return T_STRING; 04378 } 04379 } 04380 YY_BREAK 04381 case 152: 04382 /* rule 152 can match eol */ 04383 YY_RULE_SETUP 04384 #line 829 "php_lexer.l" 04385 { 04386 return T_ENCAPSED_AND_WHITESPACE; 04387 } 04388 YY_BREAK 04389 case 153: 04390 /* rule 153 can match eol */ 04391 YY_RULE_SETUP 04392 #line 833 "php_lexer.l" 04393 { 04394 return T_ENCAPSED_AND_WHITESPACE; 04395 } 04396 YY_BREAK 04397 case 154: 04398 YY_RULE_SETUP 04399 #line 837 "php_lexer.l" 04400 { 04401 return T_ENCAPSED_AND_WHITESPACE; 04402 } 04403 YY_BREAK 04404 case 155: 04405 YY_RULE_SETUP 04406 #line 842 "php_lexer.l" 04407 { 04408 return T_ENCAPSED_AND_WHITESPACE; 04409 } 04410 YY_BREAK 04411 case 156: 04412 /* rule 156 can match eol */ 04413 YY_RULE_SETUP 04414 #line 846 "php_lexer.l" 04415 { 04416 if (yyleng == 2) { 04417 yyless(1); 04418 } 04419 return T_CHARACTER; 04420 } 04421 YY_BREAK 04422 case 157: 04423 YY_RULE_SETUP 04424 #line 854 "php_lexer.l" 04425 { 04426 return yytext[0]; 04427 } 04428 YY_BREAK 04429 case 158: 04430 YY_RULE_SETUP 04431 #line 858 "php_lexer.l" 04432 { 04433 return T_STRING; 04434 } 04435 YY_BREAK 04436 case 159: 04437 YY_RULE_SETUP 04438 #line 862 "php_lexer.l" 04439 { 04440 yy_push_state(ST_IN_SCRIPTING); 04441 yyless(1); 04442 return T_CURLY_OPEN; 04443 } 04444 YY_BREAK 04445 case 160: 04446 YY_RULE_SETUP 04447 #line 869 "php_lexer.l" 04448 { 04449 return T_CHARACTER; 04450 } 04451 YY_BREAK 04452 case 161: 04453 YY_RULE_SETUP 04454 #line 873 "php_lexer.l" 04455 { 04456 return T_CHARACTER; 04457 } 04458 YY_BREAK 04459 case 162: 04460 YY_RULE_SETUP 04461 #line 877 "php_lexer.l" 04462 { 04463 return T_CHARACTER; 04464 } 04465 YY_BREAK 04466 case 163: 04467 YY_RULE_SETUP 04468 #line 881 "php_lexer.l" 04469 { 04470 return T_CHARACTER; 04471 } 04472 YY_BREAK 04473 case 164: 04474 YY_RULE_SETUP 04475 #line 885 "php_lexer.l" 04476 { 04477 return T_CHARACTER; 04478 } 04479 YY_BREAK 04480 case 165: 04481 YY_RULE_SETUP 04482 #line 889 "php_lexer.l" 04483 { 04484 return T_CHARACTER; 04485 } 04486 YY_BREAK 04487 case 166: 04488 /* rule 166 can match eol */ 04489 YY_RULE_SETUP 04490 #line 893 "php_lexer.l" 04491 { 04492 switch (yytext[1]) { 04493 case 'n': break; 04494 case 't': break; 04495 case 'r': break; 04496 case '\\': break; 04497 case '$': break; 04498 default: 04499 return T_BAD_CHARACTER; 04500 break; 04501 } 04502 return T_CHARACTER; 04503 } 04504 YY_BREAK 04505 case 167: 04506 YY_RULE_SETUP 04507 #line 908 "php_lexer.l" 04508 { 04509 return T_ENCAPSED_AND_WHITESPACE; 04510 } 04511 YY_BREAK 04512 case 168: 04513 YY_RULE_SETUP 04514 #line 913 "php_lexer.l" 04515 { 04516 BEGIN(ST_IN_SCRIPTING); 04517 return '\"'; 04518 } 04519 YY_BREAK 04520 case 169: 04521 YY_RULE_SETUP 04522 #line 919 "php_lexer.l" 04523 { 04524 BEGIN(ST_IN_SCRIPTING); 04525 return '`'; 04526 } 04527 YY_BREAK 04528 case 170: 04529 YY_RULE_SETUP 04530 #line 925 "php_lexer.l" 04531 { 04532 BEGIN(ST_IN_SCRIPTING); 04533 return '\''; 04534 } 04535 YY_BREAK 04536 case YY_STATE_EOF(ST_DOUBLE_QUOTES): 04537 case YY_STATE_EOF(ST_BACKQUOTE): 04538 case YY_STATE_EOF(INITIAL): 04539 case YY_STATE_EOF(ST_IN_SCRIPTING): 04540 case YY_STATE_EOF(ST_LOOKING_FOR_PROPERTY): 04541 #line 931 "php_lexer.l" 04542 { 04543 return 0; 04544 } 04545 YY_BREAK 04546 case YY_STATE_EOF(ST_COMMENT): 04547 case YY_STATE_EOF(ST_DOC_COMMENT): 04548 #line 935 "php_lexer.l" 04549 { 04550 printf("Unterminated comment starting line %d", comment_start_line); 04551 return 0; 04552 } 04553 YY_BREAK 04554 case 171: 04555 /* rule 171 can match eol */ 04556 YY_RULE_SETUP 04557 #line 940 "php_lexer.l" 04558 { 04559 printf("Unexpected character in input: '%c' (ASCII=%d) state=%d", yytext[0], yytext[0], YYSTATE); 04560 } 04561 YY_BREAK 04562 case 172: 04563 YY_RULE_SETUP 04564 #line 943 "php_lexer.l" 04565 ECHO; 04566 YY_BREAK 04567 #line 4568 "php_lexer.c" 04568 case YY_STATE_EOF(ST_SINGLE_QUOTE): 04569 case YY_STATE_EOF(ST_HEREDOC): 04570 case YY_STATE_EOF(ST_LOOKING_FOR_VARNAME): 04571 case YY_STATE_EOF(ST_ONE_LINE_COMMENT): 04572 yyterminate(); 04573 04574 case YY_END_OF_BUFFER: 04575 { 04576 /* Amount of text matched not including the EOB char. */ 04577 int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1; 04578 04579 /* Undo the effects of YY_DO_BEFORE_ACTION. */ 04580 *yy_cp = (yy_hold_char); 04581 YY_RESTORE_YY_MORE_OFFSET 04582 04583 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) 04584 { 04585 /* We're scanning a new file or input source. It's 04586 * possible that this happened because the user 04587 * just pointed yyin at a new source and called 04588 * yylex(). If so, then we have to assure 04589 * consistency between YY_CURRENT_BUFFER and our 04590 * globals. Here is the right place to do so, because 04591 * this is the first action (other than possibly a 04592 * back-up) that will match for the new input source. 04593 */ 04594 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; 04595 YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; 04596 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; 04597 } 04598 04599 /* Note that here we test for yy_c_buf_p "<=" to the position 04600 * of the first EOB in the buffer, since yy_c_buf_p will 04601 * already have been incremented past the NUL character 04602 * (since all states make transitions on EOB to the 04603 * end-of-buffer state). Contrast this with the test 04604 * in input(). 04605 */ 04606 if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) 04607 { /* This was really a NUL. */ 04608 yy_state_type yy_next_state; 04609 04610 (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; 04611 04612 yy_current_state = yy_get_previous_state( ); 04613 04614 /* Okay, we're now positioned to make the NUL 04615 * transition. We couldn't have 04616 * yy_get_previous_state() go ahead and do it 04617 * for us because it doesn't know how to deal 04618 * with the possibility of jamming (and we don't 04619 * want to build jamming into it because then it 04620 * will run more slowly). 04621 */ 04622 04623 yy_next_state = yy_try_NUL_trans( yy_current_state ); 04624 04625 yy_bp = (yytext_ptr) + YY_MORE_ADJ; 04626 04627 if ( yy_next_state ) 04628 { 04629 /* Consume the NUL. */ 04630 yy_cp = ++(yy_c_buf_p); 04631 yy_current_state = yy_next_state; 04632 goto yy_match; 04633 } 04634 04635 else 04636 { 04637 yy_cp = (yy_c_buf_p); 04638 goto yy_find_action; 04639 } 04640 } 04641 04642 else switch ( yy_get_next_buffer( ) ) 04643 { 04644 case EOB_ACT_END_OF_FILE: 04645 { 04646 (yy_did_buffer_switch_on_eof) = 0; 04647 04648 if ( yywrap( ) ) 04649 { 04650 /* Note: because we've taken care in 04651 * yy_get_next_buffer() to have set up 04652 * yytext, we can now set up 04653 * yy_c_buf_p so that if some total 04654 * hoser (like flex itself) wants to 04655 * call the scanner after we return the 04656 * YY_NULL, it'll still work - another 04657 * YY_NULL will get returned. 04658 */ 04659 (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ; 04660 04661 yy_act = YY_STATE_EOF(YY_START); 04662 goto do_action; 04663 } 04664 04665 else 04666 { 04667 if ( ! (yy_did_buffer_switch_on_eof) ) 04668 YY_NEW_FILE; 04669 } 04670 break; 04671 } 04672 04673 case EOB_ACT_CONTINUE_SCAN: 04674 (yy_c_buf_p) = 04675 (yytext_ptr) + yy_amount_of_matched_text; 04676 04677 yy_current_state = yy_get_previous_state( ); 04678 04679 yy_cp = (yy_c_buf_p); 04680 yy_bp = (yytext_ptr) + YY_MORE_ADJ; 04681 goto yy_match; 04682 04683 case EOB_ACT_LAST_MATCH: 04684 (yy_c_buf_p) = 04685 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)]; 04686 04687 yy_current_state = yy_get_previous_state( ); 04688 04689 yy_cp = (yy_c_buf_p); 04690 yy_bp = (yytext_ptr) + YY_MORE_ADJ; 04691 goto yy_find_action; 04692 } 04693 break; 04694 } 04695 04696 default: 04697 YY_FATAL_ERROR( 04698 "fatal flex scanner internal error--no action found" ); 04699 } /* end of action switch */ 04700 } /* end of scanning one token */ 04701 } /* end of yylex */
int yylex_destroy | ( | void | ) |
Definition at line 5508 of file php_lexer.c.
References YY_CURRENT_BUFFER, YY_CURRENT_BUFFER_LVALUE, yy_delete_buffer(), yyfree(), and yypop_buffer_state().
05509 { 05510 05511 /* Pop the buffer stack, destroying each element. */ 05512 while(YY_CURRENT_BUFFER){ 05513 yy_delete_buffer(YY_CURRENT_BUFFER ); 05514 YY_CURRENT_BUFFER_LVALUE = NULL; 05515 yypop_buffer_state(); 05516 } 05517 05518 /* Destroy the stack itself. */ 05519 yyfree((yy_buffer_stack) ); 05520 (yy_buffer_stack) = NULL; 05521 05522 /* Destroy the start condition stack. */ 05523 yyfree((yy_start_stack) ); 05524 (yy_start_stack) = NULL; 05525 05526 return 0; 05527 }
void yypop_buffer_state | ( | void | ) |
Removes and deletes the top of the stack, if present. The next element becomes the new top.
Definition at line 5218 of file php_lexer.c.
References yy_buffer_stack_top, YY_CURRENT_BUFFER, YY_CURRENT_BUFFER_LVALUE, yy_delete_buffer(), yy_did_buffer_switch_on_eof, and yy_load_buffer_state().
Referenced by yylex_destroy().
05219 { 05220 if (!YY_CURRENT_BUFFER) 05221 return; 05222 05223 yy_delete_buffer(YY_CURRENT_BUFFER ); 05224 YY_CURRENT_BUFFER_LVALUE = NULL; 05225 if ((yy_buffer_stack_top) > 0) 05226 --(yy_buffer_stack_top); 05227 05228 if (YY_CURRENT_BUFFER) { 05229 yy_load_buffer_state( ); 05230 (yy_did_buffer_switch_on_eof) = 1; 05231 } 05232 }
void yypush_buffer_state | ( | YY_BUFFER_STATE | new_buffer | ) |
Pushes the new state onto the stack. The new state becomes the current state. This function will allocate the stack if necessary.
new_buffer | The new state. |
Definition at line 5188 of file php_lexer.c.
References yy_buffer_stack_top, yy_c_buf_p, YY_CURRENT_BUFFER, YY_CURRENT_BUFFER_LVALUE, yy_did_buffer_switch_on_eof, yy_hold_char, yy_load_buffer_state(), yy_n_chars, and yyensure_buffer_stack().
05189 { 05190 if (new_buffer == NULL) 05191 return; 05192 05193 yyensure_buffer_stack(); 05194 05195 /* This block is copied from yy_switch_to_buffer. */ 05196 if ( YY_CURRENT_BUFFER ) 05197 { 05198 /* Flush out information for old buffer. */ 05199 *(yy_c_buf_p) = (yy_hold_char); 05200 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); 05201 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); 05202 } 05203 05204 /* Only push if top exists. Otherwise, replace top. */ 05205 if (YY_CURRENT_BUFFER) 05206 (yy_buffer_stack_top)++; 05207 YY_CURRENT_BUFFER_LVALUE = new_buffer; 05208 05209 /* copied from yy_switch_to_buffer. */ 05210 yy_load_buffer_state( ); 05211 (yy_did_buffer_switch_on_eof) = 1; 05212 }
void * yyrealloc | ( | void * | ptr, | |
yy_size_t | size | |||
) |
Definition at line 5558 of file php_lexer.c.
Referenced by yy_get_next_buffer(), yy_push_state(), and yyensure_buffer_stack().
05559 { 05560 /* The cast to (char *) in the following accommodates both 05561 * implementations that use char* generic pointers, and those 05562 * that use void* generic pointers. It works with the latter 05563 * because both ANSI C and C++ allow castless assignment from 05564 * any pointer type to void*, and deal with argument conversions 05565 * as though doing an assignment. 05566 */ 05567 return (void *) realloc( (char *) ptr, size ); 05568 }
void yyrestart | ( | FILE * | input_file | ) |
Immediately switch to a different input stream.
input_file | A readable stream. |
INITIAL
. Definition at line 5018 of file php_lexer.c.
References YY_BUF_SIZE, yy_create_buffer(), YY_CURRENT_BUFFER, YY_CURRENT_BUFFER_LVALUE, yy_init_buffer(), yy_load_buffer_state(), yyensure_buffer_stack(), and yyin.
Referenced by input(), and yy_get_next_buffer().
05019 { 05020 05021 if ( ! YY_CURRENT_BUFFER ){ 05022 yyensure_buffer_stack (); 05023 YY_CURRENT_BUFFER_LVALUE = 05024 yy_create_buffer(yyin,YY_BUF_SIZE ); 05025 } 05026 05027 yy_init_buffer(YY_CURRENT_BUFFER,input_file ); 05028 yy_load_buffer_state( ); 05029 }
void yyset_debug | ( | int | bdebug | ) |
void yyset_in | ( | FILE * | in_str | ) |
Set the input stream. This does not discard the current input buffer.
in_str | A readable stream. |
Definition at line 5487 of file php_lexer.c.
References yyin.
05488 { 05489 yyin = in_str ; 05490 }
void yyset_lineno | ( | int | line_number | ) |
Set the current line number.
line_number |
Definition at line 5475 of file php_lexer.c.
05476 { 05477 05478 yylineno = line_number; 05479 }
void yyset_out | ( | FILE * | out_str | ) |
Definition at line 5492 of file php_lexer.c.
References yyout.
05493 { 05494 yyout = out_str ; 05495 }
static void yyunput | ( | int | c, | |
register char * | yy_bp | |||
) | [static] |
Definition at line 4892 of file php_lexer.c.
References yy_c_buf_p, YY_CURRENT_BUFFER_LVALUE, YY_FATAL_ERROR, yy_hold_char, yy_n_chars, and yytext_ptr.
04893 { 04894 register char *yy_cp; 04895 04896 yy_cp = (yy_c_buf_p); 04897 04898 /* undo effects of setting up yytext */ 04899 *yy_cp = (yy_hold_char); 04900 04901 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) 04902 { /* need to shift things up to make room */ 04903 /* +2 for EOB chars. */ 04904 register int number_to_move = (yy_n_chars) + 2; 04905 register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ 04906 YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; 04907 register char *source = 04908 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]; 04909 04910 while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) 04911 *--dest = *--source; 04912 04913 yy_cp += (int) (dest - source); 04914 yy_bp += (int) (dest - source); 04915 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = 04916 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size; 04917 04918 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) 04919 YY_FATAL_ERROR( "flex scanner push-back overflow" ); 04920 } 04921 04922 *--yy_cp = (char) c; 04923 04924 if ( c == '\n' ){ 04925 --yylineno; 04926 } 04927 04928 (yytext_ptr) = yy_bp; 04929 (yy_hold_char) = *yy_cp; 04930 (yy_c_buf_p) = yy_cp; 04931 }
static void yyunput | ( | int | c, | |
char * | buf_ptr | |||
) | [static] |
int asp_tags = 0 |
Definition at line 2888 of file php_lexer.c.
int comment_start_line = 0 |
Definition at line 2891 of file php_lexer.c.
int* heredoc |
Definition at line 2893 of file php_lexer.c.
int heredoc_len = 4 |
Definition at line 2892 of file php_lexer.c.
int lineno = 0 |
Definition at line 2890 of file php_lexer.c.
int short_tags = 0 |
Definition at line 2889 of file php_lexer.c.
flex_int16_t yy_accept[1454] [static] |
Definition at line 379 of file php_lexer.c.
flex_int16_t yy_base[1878] [static] |
Definition at line 587 of file php_lexer.c.
YY_BUFFER_STATE* yy_buffer_stack = 0 [static] |
Stack as an array.
Definition at line 260 of file php_lexer.c.
size_t yy_buffer_stack_max = 0 [static] |
capacity of stack.
Definition at line 259 of file php_lexer.c.
Referenced by yyensure_buffer_stack().
size_t yy_buffer_stack_top = 0 [static] |
index of top of stack.
Definition at line 258 of file php_lexer.c.
Referenced by yyensure_buffer_stack(), yypop_buffer_state(), and yypush_buffer_state().
char* yy_c_buf_p = (char *) 0 [static] |
Definition at line 283 of file php_lexer.c.
Referenced by input(), yy_get_next_buffer(), yy_get_previous_state(), yy_load_buffer_state(), yy_switch_to_buffer(), yy_try_NUL_trans(), yylex(), yypush_buffer_state(), and yyunput().
flex_int16_t yy_chk[8200] [static] |
Definition at line 1913 of file php_lexer.c.
flex_int16_t yy_def[1878] [static] |
Definition at line 797 of file php_lexer.c.
int yy_did_buffer_switch_on_eof [static] |
Definition at line 290 of file php_lexer.c.
Referenced by input(), yy_switch_to_buffer(), yylex(), yypop_buffer_state(), and yypush_buffer_state().
flex_int32_t yy_ec[256] [static] |
Definition at line 543 of file php_lexer.c.
int yy_flex_debug = 0 |
Definition at line 2836 of file php_lexer.c.
int yy_flex_debug |
Definition at line 2836 of file php_lexer.c.
char yy_hold_char [static] |
Definition at line 278 of file php_lexer.c.
Referenced by input(), yy_load_buffer_state(), yy_switch_to_buffer(), yylex(), yypush_buffer_state(), and yyunput().
int yy_init = 1 [static] |
char* yy_last_accepting_cpos [static] |
Definition at line 2833 of file php_lexer.c.
yy_state_type yy_last_accepting_state [static] |
Definition at line 2832 of file php_lexer.c.
flex_int32_t yy_meta[80] [static] |
Initial value:
{ 0, 1, 2, 3, 3, 4, 1, 4, 5, 4, 4, 6, 4, 4, 7, 4, 4, 4, 4, 4, 8, 8, 8, 4, 9, 10, 4, 4, 4, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 1, 1, 4, 12, 1, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 1, 4, 1 }
Definition at line 575 of file php_lexer.c.
int yy_more_flag = 0 [static] |
Definition at line 2842 of file php_lexer.c.
int yy_more_len = 0 [static] |
Definition at line 2843 of file php_lexer.c.
int yy_n_chars [static] |
Definition at line 279 of file php_lexer.c.
Referenced by input(), yy_get_next_buffer(), yy_load_buffer_state(), yy_switch_to_buffer(), yylex(), yypush_buffer_state(), and yyunput().
flex_int16_t yy_nxt[8200] [static] |
Definition at line 1007 of file php_lexer.c.
flex_int32_t yy_rule_can_match_eol[173] [static] |
Initial value:
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 1, 0, 0, 0, 1, 1, 1, 1, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, }
Definition at line 2820 of file php_lexer.c.
int yy_start = 0 [static] |
int* yy_start_stack = 0 [static] |
Definition at line 2955 of file php_lexer.c.
int yy_start_stack_depth = 0 [static] |
Definition at line 2954 of file php_lexer.c.
int yy_start_stack_ptr = 0 [static] |
Definition at line 2953 of file php_lexer.c.
FILE* yyin = (FILE *) 0 |
Definition at line 343 of file php_lexer.c.
FILE* yyin |
Definition at line 343 of file php_lexer.c.
Referenced by input(), main(), yy_get_next_buffer(), yy_load_buffer_state(), yyget_in(), yylex(), yyrestart(), and yyset_in().
int yyleng |
Definition at line 280 of file php_lexer.c.
int yyleng |
int yylineno = 1 |
Definition at line 349 of file php_lexer.c.
int yylineno |
Definition at line 349 of file php_lexer.c.
FILE * yyout = (FILE *) 0 |
Definition at line 343 of file php_lexer.c.
FILE * yyout |
char* yytext |
Definition at line 2847 of file php_lexer.c.
char* yytext |
Definition at line 2847 of file php_lexer.c.