📄 bison.c
字号:
/* A Bison parser, made from yabasic.bison by GNU bison 1.35. */#define YYBISON 1 /* Identify Bison output. */# define tSEP 257# define tFNUM 258# define tSYMBOL 259# define tSTRSYM 260# define tDOCU 261# define tDIGITS 262# define tSTRING 263# define tFOR 264# define tTO 265# define tSTEP 266# define tNEXT 267# define tWHILE 268# define tWEND 269# define tREPEAT 270# define tUNTIL 271# define tIMPORT 272# define tGOTO 273# define tGOSUB 274# define tLABEL 275# define tON 276# define tSUB 277# define tENDSUB 278# define tLOCAL 279# define tSTATIC 280# define tEXPORT 281# define tERROR 282# define tEXECUTE 283# define tEXECUTE2 284# define tCOMPILE 285# define tRUNTIME_CREATED_SUB 286# define tINTERRUPT 287# define tBREAK 288# define tCONTINUE 289# define tSWITCH 290# define tSEND 291# define tCASE 292# define tDEFAULT 293# define tLOOP 294# define tDO 295# define tEOPROG 296# define tIF 297# define tTHEN 298# define tELSE 299# define tELSIF 300# define tENDIF 301# define tUSING 302# define tPRINT 303# define tINPUT 304# define tLINE 305# define tRETURN 306# define tDIM 307# define tEND 308# define tEXIT 309# define tAT 310# define tSCREEN 311# define tREVERSE 312# define tCOLOUR 313# define tAND 314# define tOR 315# define tNOT 316# define tEOR 317# define tNEQ 318# define tLEQ 319# define tGEQ 320# define tLTN 321# define tGTN 322# define tEQU 323# define tPOW 324# define tREAD 325# define tDATA 326# define tRESTORE 327# define tOPEN 328# define tCLOSE 329# define tSEEK 330# define tTELL 331# define tAS 332# define tREADING 333# define tWRITING 334# define tORIGIN 335# define tWINDOW 336# define tDOT 337# define tCIRCLE 338# define tTEXT 339# define tCLEAR 340# define tFILL 341# define tPRINTER 342# define tWAIT 343# define tBELL 344# define tLET 345# define tARDIM 346# define tARSIZE 347# define tBIND 348# define tRECT 349# define tGETBIT 350# define tPUTBIT 351# define tGETCHAR 352# define tPUTCHAR 353# define tNEW 354# define tCURVE 355# define tSIN 356# define tASIN 357# define tCOS 358# define tACOS 359# define tTAN 360# define tATAN 361# define tEXP 362# define tLOG 363# define tSQRT 364# define tSQR 365# define tMYEOF 366# define tABS 367# define tSIG 368# define tINT 369# define tFRAC 370# define tMOD 371# define tRAN 372# define tLEN 373# define tVAL 374# define tLEFT 375# define tRIGHT 376# define tMID 377# define tMIN 378# define tMAX 379# define tSTR 380# define tINKEY 381# define tCHR 382# define tASC 383# define tHEX 384# define tDEC 385# define tBIN 386# define tUPPER 387# define tLOWER 388# define tMOUSEX 389# define tMOUSEY 390# define tMOUSEB 391# define tMOUSEMOD 392# define tTRIM 393# define tLTRIM 394# define tRTRIM 395# define tINSTR 396# define tRINSTR 397# define tSYSTEM 398# define tSYSTEM2 399# define tPEEK 400# define tPEEK2 401# define tPOKE 402# define tDATE 403# define tTIME 404# define tTOKEN 405# define tTOKENALT 406# define tSPLIT 407# define tSPLITALT 408# define tGLOB 409# define UMINUS 410/* YABASIC --- a simple Basic Interpreter written by Marc-Oliver Ihm 1995-2004 homepage: www.yabasic.de BISON part This file is part of yabasic and may be copied only under the terms of either the Artistic License or the GNU General Public License (GPL), both of which can be found at www.yabasic.de*/#ifndef YABASIC_INCLUDED#include "yabasic.h" /* definitions of yabasic */#endif#include <malloc.h>#if HAVE_ALLOCA_H#ifndef WINDOWS#include <alloca.h>#endif#endifvoid __yy_bcopy(char *,char *,int); /* prototype missing */int tileol; /* true, read should go to eon of line */int yylineno=1; /* line number; counts fresh in every new file */int main_lineno=1; /* line number of main */int function_type=ftNONE; /* contains function type while parsing function */char *current_function=NULL; /* name of currently parsed function */int exported=FALSE; /* true, if function is exported */int yylex(void);extern struct libfile_name *current_libfile; /* defined in main.c: name of currently parsed file */int missing_endif=0;int missing_endif_line=0;int missing_endsub=0;int missing_endsub_line=0;int missing_next=0;int missing_next_line=0;int missing_wend=0;int missing_wend_line=0;int missing_until=0;int missing_until_line=0;int missing_loop=0;int missing_loop_line=0;int in_loop=0;void report_missing(int severity,char *text) { if (missing_loop || missing_endif || missing_next || missing_until || missing_wend) { error(severity,text); string[0]='\0'; if (missing_endif) sprintf(string,"if statement starting at line %d has seen no 'endif' yet",missing_endif_line); else if (missing_next) sprintf(string,"for-loop starting at line %d has seen no 'next' yet",missing_next_line); else if (missing_wend) sprintf(string,"while-loop starting at line %d has seen no 'wend' yet",missing_wend_line); else if (missing_until) sprintf(string,"repeat-loop starting at line %d has seen no 'until' yet",missing_until_line); else if (missing_loop) sprintf(string,"do-loop starting at line %d has seen no 'loop' yet",missing_wend_line);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -