|
27 | 27 | #include "ext/standard/info.h"
|
28 | 28 | #include "php_tokenizer.h"
|
29 | 29 |
|
30 |
| -typedef struct yy_buffer_state *YY_BUFFER_STATE; |
31 |
| -typedef unsigned int yy_size_t; |
32 |
| -struct yy_buffer_state |
33 |
| - { |
34 |
| - FILE *yy_input_file; |
35 |
| - |
36 |
| - char *yy_ch_buf; /* input buffer */ |
37 |
| - char *yy_buf_pos; /* current position in input buffer */ |
38 |
| - |
39 |
| - /* Size of input buffer in bytes, not including room for EOB |
40 |
| - * characters. |
41 |
| - */ |
42 |
| - yy_size_t yy_buf_size; |
43 |
| - |
44 |
| - /* Number of characters read into yy_ch_buf, not including EOB |
45 |
| - * characters. |
46 |
| - */ |
47 |
| - int yy_n_chars; |
48 |
| - |
49 |
| - /* Whether we "own" the buffer - i.e., we know we created it, |
50 |
| - * and can realloc() it to grow it, and should free() it to |
51 |
| - * delete it. |
52 |
| - */ |
53 |
| - int yy_is_our_buffer; |
54 |
| - |
55 |
| - /* Whether this is an "interactive" input source; if so, and |
56 |
| - * if we're using stdio for input, then we want to use getc() |
57 |
| - * instead of fread(), to make sure we stop fetching input after |
58 |
| - * each newline. |
59 |
| - */ |
60 |
| - int yy_is_interactive; |
61 |
| - |
62 |
| - /* Whether we're considered to be at the beginning of a line. |
63 |
| - * If so, '^' rules will be active on the next match, otherwise |
64 |
| - * not. |
65 |
| - */ |
66 |
| - int yy_at_bol; |
67 |
| - |
68 |
| - /* Whether to try to fill the input buffer when we reach the |
69 |
| - * end of it. |
70 |
| - */ |
71 |
| - int yy_fill_buffer; |
72 |
| - |
73 |
| - int yy_buffer_status; |
74 |
| -#define YY_BUFFER_NEW 0 |
75 |
| -#define YY_BUFFER_NORMAL 1 |
76 |
| - /* When an EOF's been seen but there's still some text to process |
77 |
| - * then we mark the buffer as YY_EOF_PENDING, to indicate that we |
78 |
| - * shouldn't try reading from the input source any more. We might |
79 |
| - * still have a bunch of tokens to match, though, because of |
80 |
| - * possible backing-up. |
81 |
| - * |
82 |
| - * When we actually see the EOF, we change the status to "new" |
83 |
| - * (via yyrestart()), so that the user can continue scanning by |
84 |
| - * just pointing yyin at a new input file. |
85 |
| - */ |
86 |
| -#define YY_BUFFER_EOF_PENDING 2 |
87 |
| - }; |
88 |
| - |
89 | 30 | #include "zend.h"
|
90 | 31 | #include "zend_language_scanner.h"
|
| 32 | +#include "zend_language_scanner_defs.h" |
91 | 33 | #include <zend_language_parser.h>
|
92 | 34 |
|
93 | 35 | #define zendtext LANG_SCNG(yy_text)
|
@@ -224,7 +166,7 @@ PHP_FUNCTION(token_get_all)
|
224 | 166 | RETURN_EMPTY_STRING();
|
225 | 167 | }
|
226 | 168 |
|
227 |
| - LANG_SCNG(start) = 1; |
| 169 | + LANG_SCNG(yy_state) = yycINITIAL; |
228 | 170 |
|
229 | 171 | tokenize(return_value TSRMLS_CC);
|
230 | 172 |
|
|
0 commit comments