- Remove rcsid tag.
+ ANSI C conversion.
This commit is contained in:
parent
82fddaab77
commit
e533626413
|
@ -4,147 +4,147 @@
|
|||
*/
|
||||
|
||||
|
||||
#ifndef NORCSID
|
||||
static char rcs_lex[] = "$Id$" ;
|
||||
#endif
|
||||
|
||||
|
||||
/* This file contains the new lexical analizer */
|
||||
typedef struct {
|
||||
char *name;
|
||||
int token, classvalue,length;
|
||||
int token;
|
||||
int classvalue;
|
||||
int length;
|
||||
} Key;
|
||||
|
||||
Key keywords [] ={
|
||||
"abs", FUNCTION, ABSSYM, 0,
|
||||
"and", ANDSYM, ANDSYM, 0,
|
||||
"asc", FUNCTION, ASCSYM, 0,
|
||||
"as", ASSYM, 0, 0,
|
||||
"atn", FUNCTION, ATNSYM, 0,
|
||||
"auto", ILLEGAL, 0, 0,
|
||||
"base", BASESYM, 0, 0,
|
||||
"call", CALLSYM, 0, 0,
|
||||
"cdbl", FUNCTION, CDBLSYM, 0,
|
||||
"chain", ILLEGAL, 0, 0,
|
||||
"chr", FUNCTION, CHRSYM, 0,
|
||||
"cint", FUNCTION, CINTSYM, 0,
|
||||
"clear", CLEARSYM, 0, 0,
|
||||
"cload", ILLEGAL, 0, 0,
|
||||
"close", CLOSESYM, 0, 0,
|
||||
"common", ILLEGAL, 0, 0,
|
||||
"cont", ILLEGAL, 0, 0,
|
||||
"cos", FUNCTION, COSSYM, 0,
|
||||
"csng", FUNCTION, CSNGSYM, 0,
|
||||
"csave", ILLEGAL, 0, 0,
|
||||
"cvi", FUNCTION, CVISYM, 0,
|
||||
"cvs", FUNCTION, CVSSYM, 0,
|
||||
"cvd", FUNCTION, CVDSYM, 0,
|
||||
"data", DATASYM, 0, 0,
|
||||
"defint", DEFINTSYM, 0, 0,
|
||||
"defsng", DEFSNGSYM, 0, 0,
|
||||
"defdbl", DEFDBLSYM, 0, 0,
|
||||
"defstr", DEFSTRSYM, 0, 0,
|
||||
"def", DEFSYM, 0, 0,
|
||||
"delete", ILLEGAL, 0, 0,
|
||||
"dim", DIMSYM, 0, 0,
|
||||
"edit", ILLEGAL, 0, 0,
|
||||
"else", ELSESYM, 0, 0,
|
||||
"end", ENDSYM, 0, 0,
|
||||
"eof", FUNCTION, EOFSYM, 0,
|
||||
"eqv", EQVSYM, EQVSYM, 0,
|
||||
"erase", ILLEGAL, 0, 0,
|
||||
"error", ERRORSYM, 0, 0,
|
||||
"err", ERRSYM, 0, 0,
|
||||
"erl", ERLSYM, 0, 0,
|
||||
"exp", FUNCTION, EXPSYM, 0,
|
||||
"field", FIELDSYM, 0, 0,
|
||||
"fix", FUNCTION, FIXSYM, 0,
|
||||
"for", FORSYM, 0, 0,
|
||||
"fre", FUNCTION, FRESYM, 0,
|
||||
"get", GETSYM, 0, 0,
|
||||
"gosub", GOSUBSYM, 0, 0,
|
||||
"goto", GOTOSYM, 0, 0,
|
||||
"hex", FUNCTION, HEXSYM, 0,
|
||||
"if", IFSYM, 0, 0,
|
||||
"imp", IMPSYM, IMPSYM, 0,
|
||||
"inkey", INKEYSYM, 0, 0,
|
||||
"input", INPUTSYM, 0, 0,
|
||||
"inp", FUNCTION, INPSYM, 0,
|
||||
"instr", FUNCTION, INSTRSYM, 0,
|
||||
"int", FUNCTION, INTSYM, 0,
|
||||
"kill", ILLEGAL, 0, 0,
|
||||
"left", FUNCTION, LEFTSYM, 0,
|
||||
"len", FUNCTION, LENSYM, 0,
|
||||
"let", LETSYM, 0, 0,
|
||||
"line", LINESYM, 0, 0,
|
||||
"list", LISTSYM, 0, 0,
|
||||
"llist", ILLEGAL, 0, 0,
|
||||
"load", LOADSYM, 0, 0,
|
||||
"loc", FUNCTION, LOCSYM, 0,
|
||||
"log", FUNCTION, LOGSYM, 0,
|
||||
"lpos", FUNCTION, LPOSSYM, 0,
|
||||
"lprint", ILLEGAL, 0, 0,
|
||||
"lset", LSETSYM, 0, 0,
|
||||
"merge", MERGESYM, 0, 0,
|
||||
"mid", MIDSYM, 0, 0,
|
||||
"mki", FUNCTION, MKISYM, 0,
|
||||
"mks", FUNCTION, MKSSYM, 0,
|
||||
"mkd", FUNCTION, MKDSYM, 0,
|
||||
"mod", MODSYM, 0, 0,
|
||||
"name", ILLEGAL, 0, 0,
|
||||
"new", ILLEGAL, 0, 0,
|
||||
"next", NEXTSYM, 0, 0,
|
||||
"not", NOTSYM, 0, 0,
|
||||
"null", ILLEGAL, 0, 0,
|
||||
"on", ONSYM, 0, 0,
|
||||
"oct", FUNCTION, OCTSYM, 0,
|
||||
"open", OPENSYM, 0, 0,
|
||||
"option", OPTIONSYM, 0, 0,
|
||||
"or", ORSYM, ORSYM, 0,
|
||||
"out", FUNCTION, OUTSYM, 0,
|
||||
"peek", PEEKSYM, 0, 0,
|
||||
"poke", POKESYM, 0, 0,
|
||||
"print", PRINTSYM, 0, 0,
|
||||
"pos", FUNCTION, POSSYM, 0,
|
||||
"put", PUTSYM, 0, 0,
|
||||
"randomize", RANDOMIZESYM, 0, 0,
|
||||
"read", READSYM, 0, 0,
|
||||
"rem", REMSYM, 0, 0,
|
||||
"renum", ILLEGAL, 0, 0,
|
||||
"ren", ILLEGAL, 0, 0,
|
||||
"restore", RESTORESYM, 0, 0,
|
||||
"resume", ILLEGAL, 0, 0,
|
||||
"return", RETURNSYM, 0, 0,
|
||||
"right", FUNCTION, RIGHTSYM, 0,
|
||||
"rnd", FUNCTION, RNDSYM, 0,
|
||||
"run", ILLEGAL, 0, 0,
|
||||
"save", ILLEGAL, 0, 0,
|
||||
"step", STEPSYM, 0, 0,
|
||||
"sgn", FUNCTION, SGNSYM, 0,
|
||||
"sin", FUNCTION, SINSYM, 0,
|
||||
"space", FUNCTION, SPACESYM, 0,
|
||||
"spc", FUNCTION, SPCSYM, 0,
|
||||
"sqr", FUNCTION, SQRSYM, 0,
|
||||
"stop", STOPSYM, 0, 0,
|
||||
"string", FUNCTION, STRINGSYM, 0,
|
||||
"str", FUNCTION, STRSYM, 0,
|
||||
"swap", SWAPSYM, 0, 0,
|
||||
"tab", FUNCTION, TABSYM, 0,
|
||||
"tan", FUNCTION, TANSYM, 0,
|
||||
"then", THENSYM, 0, 0,
|
||||
"to", TOSYM, 0, 0,
|
||||
"tron", TRONOFFSYM, TRONSYM, 0,
|
||||
"troff", TRONOFFSYM, TROFFSYM, 0,
|
||||
"using", USINGSYM, 0, 0,
|
||||
"usr", FUNCTION, USRSYM, 0,
|
||||
"val", FUNCTION, VALSYM, 0,
|
||||
"varptr", FUNCTION, VARPTRSYM, 0,
|
||||
"wait", ILLEGAL, 0, 0,
|
||||
"while", WHILESYM, 0, 0,
|
||||
"wend", WENDSYM, 0, 0,
|
||||
"width", ILLEGAL, 0, 0,
|
||||
"write", WRITESYM, 0, 0,
|
||||
"xor", XORSYM, XORSYM, 0,
|
||||
0, 0, 0, 0
|
||||
{"abs", FUNCTION, ABSSYM, 0},
|
||||
{"and", ANDSYM, ANDSYM, 0},
|
||||
{"asc", FUNCTION, ASCSYM, 0},
|
||||
{"as", ASSYM, 0, 0},
|
||||
{"atn", FUNCTION, ATNSYM, 0},
|
||||
{"auto", ILLEGAL, 0, 0},
|
||||
{"base", BASESYM, 0, 0},
|
||||
{"call", CALLSYM, 0, 0},
|
||||
{"cdbl", FUNCTION, CDBLSYM, 0},
|
||||
{"chain", ILLEGAL, 0, 0},
|
||||
{"chr", FUNCTION, CHRSYM, 0},
|
||||
{"cint", FUNCTION, CINTSYM, 0},
|
||||
{"clear", CLEARSYM, 0, 0},
|
||||
{"cload", ILLEGAL, 0, 0},
|
||||
{"close", CLOSESYM, 0, 0},
|
||||
{"common", ILLEGAL, 0, 0},
|
||||
{"cont", ILLEGAL, 0, 0},
|
||||
{"cos", FUNCTION, COSSYM, 0},
|
||||
{"csng", FUNCTION, CSNGSYM, 0},
|
||||
{"csave", ILLEGAL, 0, 0},
|
||||
{"cvi", FUNCTION, CVISYM, 0},
|
||||
{"cvs", FUNCTION, CVSSYM, 0},
|
||||
{"cvd", FUNCTION, CVDSYM, 0},
|
||||
{"data", DATASYM, 0, 0},
|
||||
{"defint", DEFINTSYM, 0, 0},
|
||||
{"defsng", DEFSNGSYM, 0, 0},
|
||||
{"defdbl", DEFDBLSYM, 0, 0},
|
||||
{"defstr", DEFSTRSYM, 0, 0},
|
||||
{"def", DEFSYM, 0, 0},
|
||||
{"delete", ILLEGAL, 0, 0},
|
||||
{"dim", DIMSYM, 0, 0},
|
||||
{"edit", ILLEGAL, 0, 0},
|
||||
{"else", ELSESYM, 0, 0},
|
||||
{"end", ENDSYM, 0, 0},
|
||||
{"eof", FUNCTION, EOFSYM, 0},
|
||||
{"eqv", EQVSYM, EQVSYM, 0},
|
||||
{"erase", ILLEGAL, 0, 0},
|
||||
{"error", ERRORSYM, 0, 0},
|
||||
{"err", ERRSYM, 0, 0},
|
||||
{"erl", ERLSYM, 0, 0},
|
||||
{"exp", FUNCTION, EXPSYM, 0},
|
||||
{"field", FIELDSYM, 0, 0},
|
||||
{"fix", FUNCTION, FIXSYM, 0},
|
||||
{"for", FORSYM, 0, 0},
|
||||
{"fre", FUNCTION, FRESYM, 0},
|
||||
{"get", GETSYM, 0, 0},
|
||||
{"gosub", GOSUBSYM, 0, 0},
|
||||
{"goto", GOTOSYM, 0, 0},
|
||||
{"hex", FUNCTION, HEXSYM, 0},
|
||||
{"if", IFSYM, 0, 0},
|
||||
{"imp", IMPSYM, IMPSYM, 0},
|
||||
{"inkey", INKEYSYM, 0, 0},
|
||||
{"input", INPUTSYM, 0, 0},
|
||||
{"inp", FUNCTION, INPSYM, 0},
|
||||
{"instr", FUNCTION, INSTRSYM, 0},
|
||||
{"int", FUNCTION, INTSYM, 0},
|
||||
{"kill", ILLEGAL, 0, 0},
|
||||
{"left", FUNCTION, LEFTSYM, 0},
|
||||
{"len", FUNCTION, LENSYM, 0},
|
||||
{"let", LETSYM, 0, 0},
|
||||
{"line", LINESYM, 0, 0},
|
||||
{"list", LISTSYM, 0, 0},
|
||||
{"llist", ILLEGAL, 0, 0},
|
||||
{"load", LOADSYM, 0, 0},
|
||||
{"loc", FUNCTION, LOCSYM, 0},
|
||||
{"log", FUNCTION, LOGSYM, 0},
|
||||
{"lpos", FUNCTION, LPOSSYM, 0},
|
||||
{"lprint", ILLEGAL, 0, 0},
|
||||
{"lset", LSETSYM, 0, 0},
|
||||
{"merge", MERGESYM, 0, 0},
|
||||
{"mid", MIDSYM, 0, 0},
|
||||
{"mki", FUNCTION, MKISYM, 0},
|
||||
{"mks", FUNCTION, MKSSYM, 0},
|
||||
{"mkd", FUNCTION, MKDSYM, 0},
|
||||
{"mod", MODSYM, 0, 0},
|
||||
{"name", ILLEGAL, 0, 0},
|
||||
{"new", ILLEGAL, 0, 0},
|
||||
{"next", NEXTSYM, 0, 0},
|
||||
{"not", NOTSYM, 0, 0},
|
||||
{"null", ILLEGAL, 0, 0},
|
||||
{"on", ONSYM, 0, 0},
|
||||
{"oct", FUNCTION, OCTSYM, 0},
|
||||
{"open", OPENSYM, 0, 0},
|
||||
{"option", OPTIONSYM, 0, 0},
|
||||
{"or", ORSYM, ORSYM, 0},
|
||||
{"out", FUNCTION, OUTSYM, 0},
|
||||
{"peek", PEEKSYM, 0, 0},
|
||||
{"poke", POKESYM, 0, 0},
|
||||
{"print", PRINTSYM, 0, 0},
|
||||
{"pos", FUNCTION, POSSYM, 0},
|
||||
{"put", PUTSYM, 0, 0},
|
||||
{"randomize", RANDOMIZESYM, 0, 0},
|
||||
{"read", READSYM, 0, 0},
|
||||
{"rem", REMSYM, 0, 0},
|
||||
{"renum", ILLEGAL, 0, 0},
|
||||
{"ren", ILLEGAL, 0, 0},
|
||||
{"restore", RESTORESYM, 0, 0},
|
||||
{"resume", ILLEGAL, 0, 0},
|
||||
{"return", RETURNSYM, 0, 0},
|
||||
{"right", FUNCTION, RIGHTSYM, 0},
|
||||
{"rnd", FUNCTION, RNDSYM, 0},
|
||||
{"run", ILLEGAL, 0, 0},
|
||||
{"save", ILLEGAL, 0, 0},
|
||||
{"step", STEPSYM, 0, 0},
|
||||
{"sgn", FUNCTION, SGNSYM, 0},
|
||||
{"sin", FUNCTION, SINSYM, 0},
|
||||
{"space", FUNCTION, SPACESYM, 0},
|
||||
{"spc", FUNCTION, SPCSYM, 0},
|
||||
{"sqr", FUNCTION, SQRSYM, 0},
|
||||
{"stop", STOPSYM, 0, 0},
|
||||
{"string", FUNCTION, STRINGSYM, 0},
|
||||
{"str", FUNCTION, STRSYM, 0},
|
||||
{"swap", SWAPSYM, 0, 0},
|
||||
{"tab", FUNCTION, TABSYM, 0},
|
||||
{"tan", FUNCTION, TANSYM, 0},
|
||||
{"then", THENSYM, 0, 0},
|
||||
{"to", TOSYM, 0, 0},
|
||||
{"tron", TRONOFFSYM, TRONSYM, 0},
|
||||
{"troff", TRONOFFSYM, TROFFSYM, 0},
|
||||
{"using", USINGSYM, 0, 0},
|
||||
{"usr", FUNCTION, USRSYM, 0},
|
||||
{"val", FUNCTION, VALSYM, 0},
|
||||
{"varptr", FUNCTION, VARPTRSYM, 0},
|
||||
{"wait", ILLEGAL, 0, 0},
|
||||
{"while", WHILESYM, 0, 0},
|
||||
{"wend", WENDSYM, 0, 0},
|
||||
{"width", ILLEGAL, 0, 0},
|
||||
{"write", WRITESYM, 0, 0},
|
||||
{"xor", XORSYM, XORSYM, 0},
|
||||
{0, 0, 0, 0}
|
||||
};
|
||||
|
||||
/* Keyword index table */
|
||||
|
|
Loading…
Reference in a new issue