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

📄 bison.c

📁 basic解释器源代码 microsoft visual studio 6.0环境下通过
💻 C
📖 第 1 页 / 共 5 页
字号:

/*  A Bison parser, made from yabasic.bison
 by  GNU Bison version 1.25
  */

#define YYBISON 1  /* Identify Bison output.  */

#define	tSEP	258
#define	tEOFILE	259
#define	tFNUM	260
#define	tSYMBOL	261
#define	tSTRSYM	262
#define	tDIGITS	263
#define	tSTRING	264
#define	tFOR	265
#define	tTO	266
#define	tSTEP	267
#define	tNEXT	268
#define	tGOTO	269
#define	tGOSUB	270
#define	tLABEL	271
#define	tON	272
#define	tINTERRUPT	273
#define	tBREAK	274
#define	tCONTINUE	275
#define	tIF	276
#define	tTHEN	277
#define	tELSE	278
#define	tELSIF	279
#define	tENDIF	280
#define	tUSING	281
#define	tPRINT	282
#define	tINPUT	283
#define	tLINE	284
#define	tRETURN	285
#define	tDIM	286
#define	tEND	287
#define	tAT	288
#define	tSCREEN	289
#define	tREVERSE	290
#define	tAND	291
#define	tOR	292
#define	tNOT	293
#define	tNEQ	294
#define	tLEQ	295
#define	tGEQ	296
#define	tLTN	297
#define	tGTN	298
#define	tEQU	299
#define	tREAD	300
#define	tDATA	301
#define	tRESTORE	302
#define	tOPEN	303
#define	tCLOSE	304
#define	tORIGIN	305
#define	tWINDOW	306
#define	tDOT	307
#define	tCIRCLE	308
#define	tTEXT	309
#define	tCLEAR	310
#define	tPRINTER	311
#define	tWAIT	312
#define	tBELL	313
#define	tMAP	314
#define	tXMAP	315
#define	tYMAP	316
#define	tARROW	317
#define	tXTICK	318
#define	tYTICK	319
#define	tBOX	320
#define	tRECT	321
#define	tNEW	322
#define	tMARKER	323
#define	tCURVE	324
#define	tSIN	325
#define	tASIN	326
#define	tCOS	327
#define	tACOS	328
#define	tTAN	329
#define	tATAN	330
#define	tEXP	331
#define	tLOG	332
#define	tSQRT	333
#define	tSQR	334
#define	tMYEOF	335
#define	tABS	336
#define	tSIG	337
#define	tINT	338
#define	tFRAC	339
#define	tMOD	340
#define	tRAN	341
#define	tLEN	342
#define	tVAL	343
#define	tLEFT	344
#define	tRIGHT	345
#define	tMID	346
#define	tMIN	347
#define	tMAX	348
#define	tSTR	349
#define	tINKEY	350
#define	tCHR	351
#define	tASC	352
#define	tUPPER	353
#define	tLOWER	354
#define	tTRIM	355
#define	tLTRIM	356
#define	tRTRIM	357
#define	tINSTR	358
#define	tSYSTEM	359
#define	tSYSTEM2	360
#define	tPEEK	361
#define	tPEEK2	362
#define	tPOKE	363
#define	tDATE	364
#define	tTIME	365
#define	tTOKEN	366
#define	UMINUS	367


/*
     YABASIC --- a tiny integrated Basic Compiler/Interpreter

     BISON - part
     
     this Program is subject to the GNU General Public License;
     see the file yabasic.c for details.
*/


#undef WINDOWS

#ifndef YABASIC_INCLUDED
#include "yabasic.h"     /* definitions of yabasic */
#endif

#include <malloc.h>

#if HAVE_ALLOCA_H
#include <alloca.h>
#endif

void __yy_bcopy(char *,char *,int); /* prototype missing */

int tileol; /* true, read should go to eon of line */
int yylineno=1;
int yylex(void);

typedef union {
  double fnum;          /* double number */
  int inum;             /* integer number */
  int token;            /* token of command */
  int sep;              /* number of newlines */
  char *string;         /* quoted string */
  char *symbol;         /* general symbol */
  char *digits;         /* string of digits */
  char *strsym;         /* string symbol */
} YYSTYPE;
#include <stdio.h>

#ifndef __cplusplus
#ifndef __STDC__
#define const
#endif
#endif



#define	YYFINAL		626
#define	YYFLAG		-32768
#define	YYNTBASE	123

#define YYTRANSLATE(x) ((unsigned)(x) <= 367 ? yytranslate[x] : 197)

static const char yytranslate[] = {     0,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,   121,     2,     2,     2,     2,   119,
   120,   114,   113,   118,   112,     2,   115,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,   122,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,   116,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     1,     2,     3,     4,     5,
     6,     7,     8,     9,    10,    11,    12,    13,    14,    15,
    16,    17,    18,    19,    20,    21,    22,    23,    24,    25,
    26,    27,    28,    29,    30,    31,    32,    33,    34,    35,
    36,    37,    38,    39,    40,    41,    42,    43,    44,    45,
    46,    47,    48,    49,    50,    51,    52,    53,    54,    55,
    56,    57,    58,    59,    60,    61,    62,    63,    64,    65,
    66,    67,    68,    69,    70,    71,    72,    73,    74,    75,
    76,    77,    78,    79,    80,    81,    82,    83,    84,    85,
    86,    87,    88,    89,    90,    91,    92,    93,    94,    95,
    96,    97,    98,    99,   100,   101,   102,   103,   104,   105,
   106,   107,   108,   109,   110,   111,   117
};

#if YYDEBUG != 0
static const short yyprhs[] = {     0,
     0,     3,     5,     6,     7,    13,    14,    16,    18,    20,
    22,    25,    28,    32,    36,    37,    43,    44,    50,    53,
    60,    65,    68,    69,    75,    76,    81,    82,    88,    91,
    94,    96,    99,   101,   104,   110,   118,   122,   125,   130,
   134,   137,   142,   147,   154,   171,   176,   181,   186,   189,
   192,   197,   202,   207,   214,   223,   226,   229,   232,   235,
   239,   242,   245,   247,   249,   254,   259,   264,   269,   271,
   275,   286,   295,   304,   305,   313,   315,   316,   322,   324,
   326,   328,   332,   333,   339,   343,   350,   357,   366,   371,
   378,   380,   385,   390,   395,   400,   405,   410,   415,   420,
   422,   424,   429,   436,   441,   445,   446,   454,   456,   458,
   462,   464,   465,   471,   475,   479,   483,   487,   491,   494,
   498,   505,   510,   515,   520,   525,   530,   535,   542,   547,
   552,   557,   562,   567,   572,   577,   582,   589,   594,   598,
   605,   612,   617,   622,   627,   632,   637,   644,   649,   654,
   656,   659,   662,   664,   666,   668,   670,   672,   673,   679,
   680,   688,   689,   695,   696,   704,   706,   710,   711,   712,
   713,   714,   730,   732,   734,   735,   738,   739,   741,   742,
   743,   744,   755,   757,   759,   763,   767,   771,   774,   778,
   782,   786,   790,   794,   798,   802,   806,   810,   814,   818,
   822,   827,   828,   831,   832,   833,   834,   842,   844,   845,
   850,   852,   853,   859,   861,   862,   868,   870,   874,   876,
   877,   883,   885,   886,   892,   894,   896,   900,   904,   905,
   908,   913,   915,   919,   920,   923,   925,   926,   929,   930,
   934,   935,   937,   939,   941,   944,   945,   947,   950,   957,
   960,   963,   965,   966,   968,   970,   974,   976
};

static const short yyrhs[] = {   124,
     4,     0,   127,     0,     0,     0,   124,   125,     3,   126,
   127,     0,     0,   133,     0,   140,     0,   156,     0,   164,
     0,    14,   149,     0,    15,   149,     0,    17,    18,    19,
     0,    17,    18,    20,     0,     0,    17,   142,    14,   128,
   195,     0,     0,    17,   142,    15,   129,   196,     0,    16,
   149,     0,    48,   193,   118,   137,   118,   137,     0,    48,
   193,   118,   137,     0,    49,   193,     0,     0,    27,   189,
   184,   130,   194,     0,     0,    28,   131,   186,   174,     0,
     0,    29,    28,   132,   186,   174,     0,    45,   179,     0,
    46,   183,     0,    47,     0,    47,   149,     0,    30,     0,
    31,   150,     0,    48,    51,   142,   118,   142,     0,    48,
    51,   142,   118,   142,   118,   137,     0,    51,    50,   137,
     0,    52,   144,     0,    29,   144,    11,   144,     0,    29,
    11,   144,     0,    67,    69,     0,    53,   144,   118,   142,
     0,    54,   144,   118,   137,     0,    54,   144,   118,   137,
   118,   137,     0,    59,   142,   118,   142,   118,   142,   118,
   142,    11,   142,   118,   142,   118,   142,   118,   142,     0,
    62,   144,    11,   144,     0,    63,   144,   118,   137,     0,
    64,   144,   118,   137,     0,    63,   144,     0,    64,   144,
     0,    66,   144,    11,   144,     0,    65,   144,    11,   144,
     0,    68,   144,   118,   137,     0,    68,   144,   118,   137,
   118,   142,     0,    68,   144,   118,   137,   118,   142,   118,
   142,     0,    49,    51,     0,    55,    51,     0,    55,    34,
     0,    48,    56,     0,    48,    56,   137,     0,    49,    56,
     0,    57,   142,     0,    58,     0,    95,     0,    95,   119,
   142,   120,     0,   105,   119,   137,   120,     0,   108,   137,
   118,   137,     0,   108,   137,   118,   142,     0,    32,     0,
     7,    44,   137,     0,    91,   119,   135,   118,   142,   118,
   142,   120,    44,   137,     0,    89,   119,   135,   118,   142,
   120,    44,   137,     0,    90,   119,   135,   118,   142,   120,
    44,   137,     0,     0,     7,   119,   134,   155,   120,    44,
   137,     0,     7,     0,     0,     7,   119,   136,   155,   120,
     0,     7,     0,   139,     0,     9,     0,   137,   113,   137,

⌨️ 快捷键说明

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