mirror of
git://c9x.me/qbe.git
synced 2026-04-05 18:09:47 +00:00
support _ in identifiers
This commit is contained in:
parent
2ea517ed26
commit
a968dc687d
@ -225,7 +225,7 @@ Alpha: c = fgetc(inf);
|
||||
err("identifier too long");
|
||||
tok[i++] = c;
|
||||
c = fgetc(inf);
|
||||
} while (isalpha(c) || c == '.' || isdigit(c));
|
||||
} while (isalpha(c) || c == '.' || c == '_' || isdigit(c));
|
||||
tok[i] = 0;
|
||||
ungetc(c, inf);
|
||||
if (t != TXXX) {
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
#include <string.h>
|
||||
|
||||
enum {
|
||||
NString = 16,
|
||||
NString = 32,
|
||||
NGlo = 256,
|
||||
NVar = 512,
|
||||
NStr = 256,
|
||||
@ -874,7 +874,7 @@ yylex()
|
||||
die("ident too long");
|
||||
*p++ = c;
|
||||
c = getchar();
|
||||
} while (isalpha(c));
|
||||
} while (isalpha(c) || c == '_');
|
||||
*p = 0;
|
||||
ungetc(c, stdin);
|
||||
for (i=0; kwds[i].s; i++)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user