1 /* 2 +----------------------------------------------------------------------+ 3 | Zend Engine | 4 +----------------------------------------------------------------------+ 5 | Copyright (c) 1998-2013 Zend Technologies Ltd. (http://www.zend.com) | 6 +----------------------------------------------------------------------+ 7 | This source file is subject to version 2.00 of the Zend license, | 8 | that is bundled with this package in the file LICENSE, and is | 9 | available through the world-wide-web at the following url: | 10 | http://www.zend.com/license/2_00.txt. | 11 | If you did not receive a copy of the Zend license and are unable to | 12 | obtain it through the world-wide-web, please send a note to | 13 | license@zend.com so we can mail you a copy immediately. | 14 +----------------------------------------------------------------------+ 15 | Authors: Andi Gutmans <andi@zend.com> | 16 | Zeev Suraski <zeev@zend.com> | 17 +----------------------------------------------------------------------+ 18 */ 19 20 /* $Id$ */ 21 22 #ifndef ZEND_SCANNER_H 23 #define ZEND_SCANNER_H 24 25 typedef struct _zend_lex_state { 26 unsigned int yy_leng; 27 unsigned char *yy_start; 28 unsigned char *yy_text; 29 unsigned char *yy_cursor; 30 unsigned char *yy_marker; 31 unsigned char *yy_limit; 32 int yy_state; 33 zend_stack state_stack; 34 35 zend_file_handle *in; 36 uint lineno; 37 char *filename; 38 39 #ifdef ZEND_MULTIBYTE 40 /* original (unfiltered) script */ 41 unsigned char *script_org; 42 size_t script_org_size; 43 44 /* filtered script */ 45 unsigned char *script_filtered; 46 size_t script_filtered_size; 47 48 /* input/ouput filters */ 49 zend_encoding_filter input_filter; 50 zend_encoding_filter output_filter; 51 zend_encoding *script_encoding; 52 zend_encoding *internal_encoding; 53 #endif /* ZEND_MULTIBYTE */ 54 } zend_lex_state; 55 56 57 BEGIN_EXTERN_C() 58 int zend_compare_file_handles(zend_file_handle *fh1, zend_file_handle *fh2); 59 ZEND_API void zend_save_lexical_state(zend_lex_state *lex_state TSRMLS_DC); 60 ZEND_API void zend_restore_lexical_state(zend_lex_state *lex_state TSRMLS_DC); 61 ZEND_API int zend_prepare_string_for_scanning(zval *str, char *filename TSRMLS_DC); 62 63 END_EXTERN_C() 64 65 #endif 66 67 /* 68 * Local variables: 69 * tab-width: 4 70 * c-basic-offset: 4 71 * indent-tabs-mode: t 72 * End: 73 */ 74