⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 lex..c

📁 CFront1.0的源代码,第一代C++编译器的思想...
💻 C
📖 第 1 页 / 共 5 页
字号:
extern int NFs ; #line 719 "../../src/cfront.h"extern int NFc ; #line 719 "../../src/cfront.h"extern int NFe ; #line 719 "../../src/cfront.h"extern int NFl ; #line 720 "../../src/cfront.h"extern char * line_format ; #line 722 "../../src/cfront.h"extern Plist isf_list ; #line 723 "../../src/cfront.h"extern Pstmt st_ilist ; #line 724 "../../src/cfront.h"extern Pstmt st_dlist ; #line 725 "../../src/cfront.h"extern Ptable sti_tbl ; #line 726 "../../src/cfront.h"extern Ptable std_tbl ; #line 728 "../../src/cfront.h"extern Ptype np_promote ( ) ; #line 729 "../../src/cfront.h"extern int new_key ( ) ; #line 731 "../../src/cfront.h"extern Pname dcl_list ; #line 732 "../../src/cfront.h"extern int over_call ( ) ; #line 733 "../../src/cfront.h"extern Pname Nover ; #line 734 "../../src/cfront.h"extern Pname Ncoerce ; #line 735 "../../src/cfront.h"extern int Nover_coerce ; #line 737 "../../src/cfront.h"#line 738 "../../src/cfront.h"struct iline { /* sizeof = 108 */Pname _iline_fct_name ; Pin _iline_i_next ; Ptable _iline_i_table ; Pname _iline_local [ 8] ; Pexpr _iline_arg [ 8] ; Ptype _iline_tp [ 8] ; } ; #line 747 "../../src/cfront.h"extern Pexpr curr_expr ; #line 748 "../../src/cfront.h"extern Pin curr_icall ; #line 751 "../../src/cfront.h"extern Pstmt curr_loop ; #line 752 "../../src/cfront.h"extern Pblock curr_block ; #line 753 "../../src/cfront.h"extern Pstmt curr_switch ; #line 754 "../../src/cfront.h"extern bit arg_err_suppress ; #line 755 "../../src/cfront.h"extern struct loc last_line ; #line 757 "../../src/cfront.h"extern int no_of_undcl ; #line 758 "../../src/cfront.h"extern int no_of_badcall ; #line 759 "../../src/cfront.h"extern Pname undcl ; #line 759 "../../src/cfront.h"extern Pname badcall ; #line 761 "../../src/cfront.h"extern int strlen ( ) ; #line 762 "../../src/cfront.h"extern int strcpy ( ) ; #line 763 "../../src/cfront.h"extern int strcmp ( ) ; #line 764 "../../src/cfront.h"extern int str_to_int ( ) ; #line 765 "../../src/cfront.h"extern int c_strlen ( ) ; #line 767 "../../src/cfront.h"extern Pname vec_new_fct ; #line 768 "../../src/cfront.h"extern Pname vec_del_fct ; #line 777 "../../src/cfront.h"extern Pname find_hidden ( ) ; #line 778 "../../src/cfront.h"extern TOK lalex ( ) ; #line 779 "../../src/cfront.h"extern int Nstd ; #line 781 "../../src/cfront.h"extern int stcount ; #line 3 "../../src/yystype.h"union _C10 { /* sizeof = 4 */char * __C10_s ; TOK __C10_t ; int __C10_i ; struct loc __C10_l ; Pname __C10_pn ; Ptype __C10_pt ; Pexpr __C10_pe ; Pstmt __C10_ps ; PP __C10_p ; } ; typedef union _C10 YYSTYPE ; #line 14 "../../src/yystype.h"extern union _C10 yylval ; #line 41 "../../src/size.h"extern int BI_IN_WORD ; #line 42 "../../src/size.h"extern int BI_IN_BYTE ; #line 44 "../../src/size.h"extern int SZ_CHAR ; #line 45 "../../src/size.h"extern int AL_CHAR ; #line 47 "../../src/size.h"extern int SZ_SHORT ; #line 48 "../../src/size.h"extern int AL_SHORT ; #line 50 "../../src/size.h"extern int SZ_INT ; #line 51 "../../src/size.h"extern int AL_INT ; #line 53 "../../src/size.h"extern int SZ_LONG ; #line 54 "../../src/size.h"extern int AL_LONG ; #line 56 "../../src/size.h"extern int SZ_FLOAT ; #line 57 "../../src/size.h"extern int AL_FLOAT ; #line 59 "../../src/size.h"extern int SZ_DOUBLE ; #line 60 "../../src/size.h"extern int AL_DOUBLE ; #line 62 "../../src/size.h"extern int SZ_STRUCT ; #line 63 "../../src/size.h"extern int AL_STRUCT ; #line 65 "../../src/size.h"extern int SZ_FRAME ; #line 66 "../../src/size.h"extern int AL_FRAME ; #line 68 "../../src/size.h"extern int SZ_WORD ; #line 70 "../../src/size.h"extern int SZ_WPTR ; #line 71 "../../src/size.h"extern int AL_WPTR ; #line 73 "../../src/size.h"extern int SZ_BPTR ; #line 74 "../../src/size.h"extern int AL_BPTR ; #line 77 "../../src/size.h"extern int SZ_TOP ; #line 78 "../../src/size.h"extern int SZ_BOTTOM ; #line 80 "../../src/size.h"extern char * LARGEST_INT ; #line 81 "../../src/size.h"extern int F_SENSITIVE ; #line 82 "../../src/size.h"extern int F_OPTIMIZED ; #line 7 "../../src/tqueue.h"extern int printf ( ) ; #line 8 "../../src/tqueue.h"extern int fprintf ( ) ; #line 10 "../../src/tqueue.h"struct toknode { /* sizeof = 16 */TOK _toknode_tok ; union _C10 _toknode_retval ; struct toknode * _toknode_next ; struct toknode * _toknode_last ; } ; struct toknode * _toknode__ctor ( ) ; #line 18 "../../src/tqueue.h"extern struct toknode * front ; #line 19 "../../src/tqueue.h"extern struct toknode * rear ; #line 21 "../../src/tqueue.h"extern int addtok ( ) ; #line 22 "../../src/tqueue.h"extern TOK deltok ( ) ; #line 25 "../../src/tqueue.h"extern int tlex ( ) ; #line 26 "../../src/tqueue.h"extern TOK lalex ( ) ; #line 27 "../../src/tqueue.h"extern int * malloc ( ) ; #line 29 "../../src/tqueue.h"extern union _C10 yylval ; #line 30 "../../src/tqueue.h"extern TOK tk ; #line 32 "../../src/tqueue.h"extern char * image ( ) ; #line 77 "../../src/lex.c"static char inbuf [ 49152] ; #line 78 "../../src/lex.c"char * txtmax = ( char * ) ( & ( inbuf [ 49151] ) ) #line 78 "../../src/lex.c"; #line 79 "../../src/lex.c"char * txtstart = 0 ; #line 80 "../../src/lex.c"char * txtfree = 0 ; #line 85 "../../src/lex.c"static char * file_name [ 508] ; #line 88 "../../src/lex.c"static short file_stack [ 127] ; #line 89 "../../src/lex.c"int curr_file = 0 ; #line 92 "../../src/lex.c"struct loc curloc ; #line 93 "../../src/lex.c"struct _iobuf * out_file = ( struct _iobuf * ) ( & ( _iob [ 1 ] ) ) #line 93 "../../src/lex.c"; #line 94 "../../src/lex.c"struct _iobuf * in_file = ( struct _iobuf * ) ( & ( _iob [ 0 ] ) #line 94 "../../src/lex.c") ; #line 95 "../../src/lex.c"Ptable ktbl ; #line 96 "../../src/lex.c"int br_level = 0 ; #line 97 "../../src/lex.c"int bl_level = 0 ; #line 111 "../../src/lex.c"static short lxmask [ 129] ; #line 113 "../../src/lex.c"int saved = 0 ; #line 114 "../../src/lex.c"extern int lxtitle ( ) ; #line 117 "../../src/lex.c"; #line 118 "../../src/lex.c"; #line 119 "../../src/lex.c"; #line 120 "../../src/lex.c"; #line 130 "../../src/lex.c"extern int ktbl_init ( ) #line 135 "../../src/lex.c"{ #line 135 "../../src/lex.c"ktbl = ( struct table * ) _table__ctor ( ( struct table * #line 135 "../../src/lex.c") 0 , 123 , ( struct table * ) 0 , ( struct name * ) #line 135 "../../src/lex.c"0 ) ; #line 138 "../../src/lex.c"new_key ( ( char * ) "asm", 1 , ( int ) 0 ) ; #line 139 "../../src/lex.c"new_key ( ( char * ) "auto", 2 , 97 ) ; #line 140 "../../src/lex.c"new_key ( ( char * ) "break", 143 , 3 ) ; #line 141 "../../src/lex.c"new_key ( ( char * ) "case", 143 , 4 ) ; #line 142 "../../src/lex.c"new_key ( ( char * ) "continue", 143 , 7 ) ; #line 143 "../../src/lex.c"new_key ( ( char * ) "char", 5 , 97 ) ; #line 144 "../../src/lex.c"new_key ( ( char * ) "do", 143 , 10 ) ; #line 145 "../../src/lex.c"new_key ( ( char * ) "double", 11 , 97 ) ; #line 146 "../../src/lex.c"new_key ( ( char * ) "default", 143 , 8 ) ; #line 147 "../../src/lex.c"new_key ( ( char * ) "enum", 13 , ( int ) 0 ) ; #line 148 "../../src/lex.c"new_key ( ( char * ) "else", 143 , 12 ) ; #line 149 "../../src/lex.c"new_key ( ( char * ) "extern", 14 , 97 ) ; #line 150 "../../src/lex.c"new_key ( ( char * ) "float", 15 , 97 ) ; #line 151 "../../src/lex.c"new_key ( ( char * ) "for", 143 , 16 ) ; #line 153 "../../src/lex.c"new_key ( ( char * ) "goto", 143 , 19 ) ; #line 154 "../../src/lex.c"new_key ( ( char * ) "if", 143 , 20 ) ; #line 155 "../../src/lex.c"new_key ( ( char * ) "int", 21 , 97 ) ; #line 156 "../../src/lex.c"new_key ( ( char * ) "long", 22 , 97 ) ; #line 157 "../../src/lex.c"new_key ( ( char * ) "return", 143 , 28 ) ; #line 158 "../../src/lex.c"new_key ( ( char * ) "register", 27 , 97 ) ; #line 159 "../../src/lex.c"new_key ( ( char * ) "static", 31 , 97 ) ; #line 160 "../../src/lex.c"new_key ( ( char * ) "struct", 32 , 156 ) ; #line 161 "../../src/lex.c"new_key ( ( char * ) "sizeof", 30 , ( int ) 0 ) ; #line 162 "../../src/lex.c"new_key ( ( char * ) "short", 29 , 97 ) ; #line 163 "../../src/lex.c"new_key ( ( char * ) "switch", 143 , 33 ) ; #line 164 "../../src/lex.c"new_key ( ( char * ) "typedef", 35 , 97 ) ; #line 165 "../../src/lex.c"new_key ( ( char * ) "unsigned", 37 , 97 ) ; #line 166 "../../src/lex.c"new_key ( ( char * ) "union", 36 , 156 ) ; #line 167 "../../src/lex.c"new_key ( ( char * ) "void", 38 , 97 ) ; #line 168 "../../src/lex.c"new_key ( ( char * ) "while", 143 , 39 ) ; #line 170 "../../src/lex.c"new_key ( ( char * ) "class", 6 , 156 ) ; #line 171 "../../src/lex.c"new_key ( ( char * ) "delete", 143 , 9 ) ; #line 172 "../../src/lex.c"new_key ( ( char * ) "friend", 18 , 97 ) ; #line 173 "../../src/lex.c"new_key ( ( char * ) "operator", 24 , ( int ) 0 ) ; #line 174 "../../src/lex.c"new_key ( ( char * ) "new", 23 , ( int ) 0 ) ; #line 175 "../../src/lex.c"new_key ( ( char * ) "public", 25 , ( int ) 0 ) ; #line 176 "../../src/lex.c"new_key ( ( char * ) "const", 26 , 97 ) ; #line 177 "../../src/lex.c"new_key ( ( char * ) "this", 34 , ( int ) 0 ) ; #line 178 "../../src/lex.c"new_key ( ( char * ) "inline", 75 , 97 ) ; #line 179 "../../src/lex.c"new_key ( ( char * ) "virtual", 77 , 97 ) ; #line 180 "../../src/lex.c"new_key ( ( char * ) "overload", 76 , 97 ) ; #line 182 "../../src/lex.c"new_key ( ( char * ) "volatile", 170 , 170 ) ; #line 183 "../../src/lex.c"new_key ( ( char * ) "signed", 171 , 171 ) ; } ; #line 186 "../../src/lex.c"extern char * src_file_name ; #line 187 "../../src/lex.c"extern char * line_format ; #line 188 "../../src/lex.c"struct loc last_line ; #line 190 "../../src/lex.c"int _loc_putline ( _auto_this ) register struct loc * _auto_this ; #line 191 "../../src/lex.c"{ #line 191 "../../src/lex.c"if ( ( _auto_this -> _loc_file == 0 ) && ( _auto_this -> _loc_line == 0 ) #line 191 "../../src/lex.c") #line 192 "../../src/lex.c"{ #line 192 "../../src/lex.c"return ; } #line 193 "../../src/lex.c"if ( ( 0 <= _auto_this -> _loc_file ) && ( _auto_this -> _loc_file < 127 ) ) #line 193 "../../src/lex.c"#line 193 "../../src/lex.c"{ #line 193 "../../src/lex.c"char * _auto_f ; #line 194 "../../src/lex.c"_auto_f = ( file_name [ _auto_this -> _loc_file ] ) ; #line 195 "../../src/lex.c"if ( _auto_f == 0 ) _auto_f = ( src_file_name ? src_file_name : "") ; #line 196 "../../src/lex.c"fprintf ( ( struct _iobuf * ) out_file , ( char * ) line_format , _auto_this -> _loc_line , _auto_f ) #line 196 "../../src/lex.c"; #line 197 "../../src/lex.c"last_line = ( * _auto_this ) ; } } ; #line 201 "../../src/lex.c"int _loc_put ( _auto_this , _auto_p ) register struct loc * _auto_this ; struct _iobuf * _auto_p ; #line 202 "../../src/lex.c"{ #line 202 "../../src/lex.c"if ( ( 0 <= _auto_this -> _loc_file ) && ( _auto_this -> _loc_file < 127 ) ) #line 202 "../../src/lex.c"#line 203 "../../src/lex.c"{ #line 203 "../../src/lex.c"char * _auto_f ; #line 204 "../../src/lex.c"_auto_f = ( file_name [ _auto_this -> _loc_file ] ) ; #line 205 "../../src/lex.c"if ( _auto_f == 0 ) _auto_f = ( src_file_name ? src_file_name : "") ; #line 206 "../../src/lex.c"fprintf ( ( struct _iobuf * ) _auto_p , ( char * ) "\"%s\", line %d: ", _auto_f , _auto_this -> _loc_line ) #line 206 "../../src/lex.c"; } } ; #line 210 "../../src/lex.c"int lxenter ( _auto_s , _auto_m ) register char * _auto_s ; int _auto_m ; #line 212 "../../src/lex.c"{ #line 212 "../../src/lex.c"register int _auto_c ; #line 215 "../../src/lex.c"while ( _auto_c = ( * ( _auto_s ++ ) ) ) ( lxmask [ _auto_c + 1 ] #line 215 "../../src/lex.c") |= _auto_m ; } ; 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -