📄 y.tab.c
字号:
# line 2 "myform.y"#include <stdio.h>#include "screen.h"#include "myform.h" #include "newtype.h" //#include "type.h"#undef ECHOstatic int NO; /*当前域*/static int LINENO; /*行号*/static char BUF[80]; /*标签或默认值*/static int ROW,COL; /*域起始行、列*/static int ROWS,COLS; /*域每行、列尺寸*/static int INDEX; /*活动域索引号*/static char *strptr; /*用户指针*/ # line 19 "myform.y"typedef union#ifdef __cplusplus YYSTYPE#endif { int ival; double dval; char sval[80]; unsigned long chval; int opval;} YYSTYPE;# define _begin 257# define _end 258# define _form 259# define _label 260# define _field 261# define _position 262# define _name 263# define _size 264# define _type 265# define _default 266# define _index 267# define _box 268# define _back 269# define _fore 270# define _optson 271# define _optsoff 272# define _just 273# define _init 274# define _term 275# define _prompt 276# define _pagination 277# define _disp 278# define _type_amount 279# define _type_alpha 280# define _type_numeric 281# define _type_text 282# define _type_date 283# define _type_integer 284# define _type_list 285# define _type_ctext 286# define _type_etext 287# define _type_digit 288# define _digit 289# define _float 290# define _str 291# define _text 292# define _justify_center 293# define _no_justification 294# define _justify_left 295# define _justify_right 296# define _a_blink 297# define _a_bold 298# define _a_dim 299# define _a_reverse 300# define _a_standout 301# define _a_normal 302# define _a_underline 303# define _a_altcharset 304# define _o_visible 305# define _o_active 306# define _o_public 307# define _o_edit 308# define _o_wrap 309# define _o_blank 310# define _o_autoskip 311# define _o_nullok 312# define _o_passok 313# define _o_static 314# define UMINUS 315#include <stdlib.h>#include <string.h>#include <unistd.h>#ifdef __cplusplus#ifndef yyerror#if !defined(YACC_HAS_CPLUS_LINKAGE) extern "C"#endif void yyerror(const char *);#endif#ifndef yylex#if !defined(YACC_HAS_CPLUS_LINKAGE) extern "C"#endif int yylex(void);#endif#if !defined(YACC_HAS_CPLUS_LINKAGE) extern "C"#endif int yyparse(void);#endif#ifdef __STDC__#define YYCONST const#else#define YYCONST#endif#define yyclearin yychar = -1#define yyerrok yyerrflag = 0extern int yychar;extern int yyerrflag;YYSTYPE yylval;YYSTYPE yyval;typedef int yytabelem;#ifndef YYMAXDEPTH#define YYMAXDEPTH 150#endif#if YYMAXDEPTH > 0int yy_yys[YYMAXDEPTH], *yys = yy_yys;YYSTYPE yy_yyv[YYMAXDEPTH], *yyv = yy_yyv;#else /* user does initial allocation */int *yys;YYSTYPE *yyv;#endifstatic int yymaxdepth = YYMAXDEPTH;# define YYERRCODE 256# line 414 "myform.y"yyerror(){ fprintf(stderr, "\r错误:行数[%d]", LINENO+1);} YYCONST yytabelem yyexca[] ={-1, 1, 0, -1, -2, 0, };# define YYNPROD 89# define YYLAST 235YYCONST yytabelem yyact[]={ 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 100, 101, 102, 103, 104, 105, 108, 106, 107, 127, 124, 125, 126, 96, 93, 95, 88, 91, 94, 97, 89, 90, 92, 47, 162, 86, 159, 12, 85, 13, 53, 48, 49, 84, 55, 54, 56, 57, 58, 50, 51, 15, 59, 52, 82, 66, 65, 161, 160, 153, 152, 154, 151, 143, 68, 142, 141, 140, 139, 129, 128, 83, 64, 63, 18, 22, 67, 18, 62, 12, 14, 13, 12, 14, 13, 30, 60, 61, 19, 12, 14, 3, 111, 15, 136, 138, 15, 99, 98, 110, 79, 78, 77, 76, 75, 74, 73, 72, 71, 70, 69, 26, 25, 24, 23, 158, 157, 156, 155, 150, 149, 148, 147, 134, 133, 132, 131, 130, 81, 80, 6, 9, 7, 5, 8, 87, 46, 40, 21, 38, 37, 36, 35, 34, 31, 17, 27, 29, 32, 39, 33, 28, 16, 11, 10, 20, 4, 2, 44, 43, 42, 41, 45, 123, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 0, 0, 122, 0, 135, 101, 102, 103, 104, 105, 108, 106, 107, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 137, 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, 146, 0, 144, 145 };YYCONST yytabelem yypact[]={ -166,-10000000, -180, -171, -183,-10000000,-10000000,-10000000,-10000000,-10000000,-10000000,-10000000, 53, 52, 51, 50, -173, -225, -174,-10000000,-10000000,-10000000, -181, -216, -217, -236, -237,-10000000,-10000000,-10000000, -184,-10000000,-10000000,-10000000,-10000000,-10000000,-10000000,-10000000,-10000000,-10000000,-10000000,-10000000,-10000000,-10000000,-10000000,-10000000,-10000000, -197, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39,-10000000,-10000000,-10000000,-10000000, 85, 84,-10000000,-10000000,-10000000,-10000000, -238, -218, -249, -254, -257, -256, -116, -116, -305, -305, -274, -219, -220,-10000000,-10000000,-10000000,-10000000,-10000000,-10000000,-10000000,-10000000,-10000000,-10000000,-10000000, 83, 82, 81, 80, 79, 56,-10000000, -116,-10000000,-10000000,-10000000,-10000000,-10000000,-10000000,-10000000,-10000000, 56, -29,-10000000,-10000000,-10000000,-10000000,-10000000,-10000000,-10000000,-10000000,-10000000,-10000000,-10000000, -29,-10000000,-10000000,-10000000,-10000000,-10000000,-10000000,-10000000, -221, -222, -223, -224, -226, -286, -286,-10000000, -305,-10000000, 78, 77, 76, 75,-10000000,-10000000,-10000000, -227, -230, -231, -228, 74, 73, 72, 71, -253, -232, -233, -258,-10000000,-10000000,-10000000,-10000000 };YYCONST yytabelem yypgo[]={ 0, 164, 163, 162, 97, 98, 161, 160, 92, 99, 159, 158, 157, 156, 155, 133, 130, 132, 134, 131, 154, 153, 152, 146, 145, 144, 143, 142, 141, 140, 139, 137, 136, 135 };YYCONST yytabelem yyr1[]={ 0, 1, 12, 13, 13, 15, 15, 15, 15, 15, 15, 14, 20, 21, 22, 22, 22, 23, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 25, 18, 26, 16, 17, 28, 29, 30, 19, 27, 31, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 6, 7, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4, 10, 11, 9, 9, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 3, 2, 2, 2, 2, 32 };YYCONST yytabelem yyr2[]={ 0, 6, 5, 4, 2, 3, 3, 3, 3, 2, 2, 5, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 7, 7, 11, 11, 7, 7, 7, 7, 7, 6, 3, 3, 3, 3, 3, 7, 15, 15, 15, 15, 7, 7, 3, 7, 7, 5, 3, 3, 3, 3, 3, 3, 3, 3, 7, 7, 3, 7, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 7, 3, 3, 3, 3, 3 };YYCONST yytabelem yychk[]={-10000000, -1, -12, 257, -13, -15, -16, -17, -18, -19, -20, -21, 262, 264, 263, 276, -22, -24, 257, 259, -14, -15, 258, 61, 61, 61, 61, -23, -18, -16, 258, -25, -16, -17, -26, -27, -28, -29, -30, -19, -31, -6, -7, -10, -11, -3, -32, 258, 266, 267, 274, 275, 278, 265, 270, 269, 271, 272, 273, 277, 260, 261, 259, 289, 289, 292, 292, 260, 261, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 44, 44, 292, 289, 292, 292, 292, -33, 282, 286, 287, 283, 288, 280, 284, 281, 279, 285, -5, -4, 126, 297, 298, 299, 300, 301, 303, 304, 302, -5, -9, -8, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, -9, -2, 294, 295, 296, 293, 289, 289, 44, 44, 44, 44, 44, 124, 38, -5, 124, 289, 289, 289, 289, 289, -4, -4, -8, 44, 44, 44, 44, 289, 290, 290, 289, 44, 44, 44, 44, 289, 290, 290, 292 };YYCONST yytabelem yydef[]={ 0, -2, 0, 0, 0, 4, 5, 6, 7, 8, 9, 10, 0, 0, 0, 0, 0, 0, 0, 2, 1, 3, 0, 0, 0, 0, 0, 12, 15, 16, 0, 13, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 88, 14, 18, 11, 0, 0, 35, 42, 17, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 36, 43, 39, 40, 41, 44, 45, 46, 47, 48, 49, 0, 0, 0, 0, 0, 55, 57, 0, 61, 62, 63, 64, 65, 66, 67, 68, 56, 69, 71, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 70, 83, 84, 85, 86, 87, 37, 38, 0, 0, 0, 0, 0, 0, 0, 60, 0, 50, 0, 0, 0, 0, 58, 59, 72, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51, 52, 53, 54 };typedef struct#ifdef __cplusplus yytoktype#endif{ char *t_name; int t_val; } yytoktype;#ifndef YYDEBUG# define YYDEBUG 0 /* don't allow debugging */#endif#if YYDEBUGYYCONST yytoktype yytoks[] ={ "_begin", 257, "_end", 258, "_form", 259, "_label", 260, "_field", 261, "_position", 262, "_name", 263, "_size", 264, "_type", 265, "_default", 266, "_index", 267, "_box", 268, "_back", 269, "_fore", 270, "_optson", 271, "_optsoff", 272, "_just", 273, "_init", 274, "_term", 275, "_prompt", 276, "_pagination", 277, "_disp", 278, "_type_amount", 279, "_type_alpha", 280, "_type_numeric", 281, "_type_text", 282, "_type_date", 283, "_type_integer", 284, "_type_list", 285, "_type_ctext", 286, "_type_etext", 287, "_type_digit", 288, "_digit", 289, "_float", 290, "_str", 291, "_text", 292, "_justify_center", 293, "_no_justification", 294, "_justify_left", 295, "_justify_right", 296, "_a_blink", 297, "_a_bold", 298, "_a_dim", 299, "_a_reverse", 300, "_a_standout", 301, "_a_normal", 302, "_a_underline", 303, "_a_altcharset", 304, "_o_visible", 305, "_o_active", 306, "_o_public", 307, "_o_edit", 308, "_o_wrap", 309, "_o_blank", 310, "_o_autoskip", 311, "_o_nullok", 312, "_o_passok", 313, "_o_static", 314, "|", 124, "&", 38, "UMINUS", 315, "-unknown-", -1 /* ends search */};YYCONST char * yyreds[] ={ "-no such reduction-", "program : formbeg formsec formend", "formbeg : _begin _form", "formsec : formsec formlist", "formsec : formlist", "formlist : position", "formlist : size", "formlist : name", "formlist : prompt", "formlist : labelbody", "formlist : fieldbody", "formend : _end _form", "labelbody : labelsec labelend", "fieldbody : fieldsec fieldend", "labelsec : _begin _label", "labelsec : labelsec name", "labelsec : labelsec position", "labelend : _end _label", "fieldsec : _begin _field", "fieldsec : fieldsec position", "fieldsec : fieldsec size", "fieldsec : fieldsec default", "fieldsec : fieldsec index", "fieldsec : fieldsec init", "fieldsec : fieldsec term", "fieldsec : fieldsec disp", "fieldsec : fieldsec prompt", "fieldsec : fieldsec type", "fieldsec : fieldsec fore", "fieldsec : fieldsec back", "fieldsec : fieldsec optson", "fieldsec : fieldsec optsoff", "fieldsec : fieldsec just", "fieldsec : fieldsec pagination", "fieldend : _end _field", "name : _name '=' _text", "default : _default '=' _text", "position : _position '=' _digit ',' _digit", "size : _size '=' _digit ',' _digit", "init : _init '=' _text", "term : _term '=' _text", "disp : _disp '=' _text", "prompt : _prompt '=' _text", "index : _index '=' _digit", "type : _type '=' typeex", "typeex : _type_text", "typeex : _type_ctext", "typeex : _type_etext", "typeex : _type_date", "typeex : _type_digit", "typeex : _type_alpha ',' _digit", "typeex : _type_integer ',' _digit ',' _digit ',' _digit", "typeex : _type_numeric ',' _digit ',' _float ',' _float", "typeex : _type_amount ',' _digit ',' _float ',' _float", "typeex : _type_list ',' _digit ',' _digit ',' _text", "fore : _fore '=' expr", "back : _back '=' expr", "expr : attr", "expr : expr '|' attr", "expr : expr '&' attr", "expr : '~' expr", "attr : _a_blink", "attr : _a_bold", "attr : _a_dim", "attr : _a_reverse", "attr : _a_standout", "attr : _a_underline", "attr : _a_altcharset", "attr : _a_normal", "optson : _optson '=' optsex", "optsoff : _optsoff '=' optsex", "optsex : opt", "optsex : optsex '|' opt", "opt : _o_visible", "opt : _o_active", "opt : _o_public", "opt : _o_edit", "opt : _o_wrap", "opt : _o_blank", "opt : _o_autoskip", "opt : _o_nullok", "opt : _o_passok", "opt : _o_static", "just : _just '=' justex", "justex : _no_justification", "justex : _justify_left", "justex : _justify_right", "justex : _justify_center", "pagination : _pagination",};#endif /* YYDEBUG */#pragma comment(exestr, "@(#) yaccpar 20.6 96/11/21 ")#pragma comment(exestr, "@(#)yacc:common/yaccpar 1.26")/*** Skeleton parser driver for yacc output*/#include <unistd.h> /* to get a definition for gettxt so C++ doesn't complain *//*** yacc user known macros and defines*/#define YYERROR goto yyerrlab#define YYACCEPT return(0)#define YYABORT return(1)#define YYBACKUP( newtoken, newvalue )\{\ if ( yychar >= 0 || ( yyr2[ yytmp ] >> 1 ) != 1 )\ {\ yyerror( _gettxt("libc.m@unixds:78", "Syntax error - cannot backup") );\ goto yyerrlab;\
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -