1986-03-10 13:07:55 +00:00
|
|
|
cat <<'--EOT--'
|
1988-08-29 15:51:48 +00:00
|
|
|
/* Generated by make.tokcase */
|
1994-06-24 14:02:31 +00:00
|
|
|
/* $Id$ */
|
1986-03-10 13:07:55 +00:00
|
|
|
#include "Lpars.h"
|
|
|
|
|
|
|
|
char *
|
|
|
|
symbol2str(tok)
|
|
|
|
int tok;
|
|
|
|
{
|
1989-11-17 11:31:05 +00:00
|
|
|
#define SIZBUF 8
|
|
|
|
/* allow for a few invocations in f.i. an argument list */
|
|
|
|
static char buf[SIZBUF];
|
|
|
|
static int index;
|
1986-03-10 13:07:55 +00:00
|
|
|
|
|
|
|
switch (tok) {
|
|
|
|
--EOT--
|
1988-08-29 15:51:48 +00:00
|
|
|
|
1986-03-10 13:07:55 +00:00
|
|
|
sed '
|
|
|
|
/{[A-Z]/!d
|
|
|
|
s/.*{\(.*\),.*\(".*"\).*$/ case \1 :\
|
|
|
|
return \2;/
|
|
|
|
'
|
1988-08-29 15:51:48 +00:00
|
|
|
|
1986-03-10 13:07:55 +00:00
|
|
|
cat <<'--EOT--'
|
1989-11-17 11:31:05 +00:00
|
|
|
default:
|
1989-11-17 11:40:48 +00:00
|
|
|
if (tok <= 0) return "end of file";
|
1989-11-17 11:31:05 +00:00
|
|
|
if (tok < 040 || tok >= 0177) {
|
|
|
|
return "bad token";
|
|
|
|
}
|
|
|
|
/* fall through */
|
1986-03-10 13:07:55 +00:00
|
|
|
case '\n':
|
|
|
|
case '\f':
|
|
|
|
case '\v':
|
|
|
|
case '\r':
|
|
|
|
case '\t':
|
1989-11-17 11:31:05 +00:00
|
|
|
index = (index+2) & (SIZBUF-1);
|
|
|
|
buf[index] = tok;
|
|
|
|
return &buf[index];
|
1986-03-10 13:07:55 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
--EOT--
|