LineNumber = i;
}
+STATIC
+CheckForLet()
+{
+ register int ch;
+
+ LoadChar(ch);
+ if (ch != EOI) {
+ if (class(ch) == STIDF) {
+ lexerror("token separator required between identifier and number");
+ }
+ PushBack();
+ }
+}
+
int
LLlex()
{
tk->TOK_INT < 0) {
lexwarning(W_ORDINARY, "character constant out of range");
}
+ CheckForLet();
return tk->tk_symb = INTEGER;
}
if (ch == 'D' && base == 10) {
}
if (ovfl)
lexwarning(W_ORDINARY, "overflow in constant");
+ CheckForLet();
return tk->tk_symb = INTEGER;
}
lexerror("real constant too long");
}
else tk->TOK_REL = Salloc(buf, (unsigned) (np - buf)) + 1;
+ CheckForLet();
return tk->tk_symb = REAL;
/*NOTREACHED*/
{
#define SIZBUF 8
/* allow for a few invocations in f.i. an argument list */
- static char buf[SIZBUF];
- static int index;
+ static char buf[SIZBUF] = { '\'', 0, '\'', 0, '\'', 0, '\'', 0};
+ static int index = 1;
switch (tok) {
--EOT--
if (tok < 040 || tok >= 0177) {
return "bad token";
}
- /* fall through */
- case '\n':
- case '\f':
- case '\v':
- case '\r':
- case '\t':
- index = (index+2) & (SIZBUF-1);
+ index = (index+4) & (SIZBUF-1);
buf[index] = tok;
- return &buf[index];
+ return &buf[index-1];
}
}
--EOT--