summaryrefslogtreecommitdiff
path: root/parse/tok.c
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2014-10-07 16:38:25 -0400
committerOri Bernstein <ori@eigenstate.org>2014-10-07 16:38:25 -0400
commiteee351ec4167b3d70cd704edb38f85c63a7eca4d (patch)
treeb7e80523eba6e930455ff25aa9fa2a8b5eebe680 /parse/tok.c
parent346c26a93cb79f89c3d0fb12d0a2d749956cebdb (diff)
downloadmc-eee351ec4167b3d70cd704edb38f85c63a7eca4d.tar.gz
Generalize grammar: specific attrs ar now lists.
Diffstat (limited to 'parse/tok.c')
-rw-r--r--parse/tok.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/parse/tok.c b/parse/tok.c
index af43857..1a0ae7f 100644
--- a/parse/tok.c
+++ b/parse/tok.c
@@ -161,7 +161,7 @@ static void eatspace(void)
static int kwd(char *s)
{
static const struct {char* kw; int tt;} kwmap[] = {
- {"$nonret", Tattr},
+ {"$noret", Tattr},
{"break", Tbreak},
{"castto", Tcast},
{"const", Tconst},
@@ -169,7 +169,7 @@ static int kwd(char *s)
{"elif", Telif},
{"else", Telse},
{"export", Texport},
- {"extern", Textern},
+ {"extern", Tattr},
{"false", Tboollit},
{"for", Tfor},
{"generic", Tgeneric},
@@ -179,7 +179,7 @@ static int kwd(char *s)
{"in", Tin},
{"match", Tmatch},
{"pkg", Tpkg},
- {"pkglocal", Tpkglocal},
+ {"pkglocal", Tattr},
{"protect", Tprotect},
{"sizeof", Tsizeof},
{"struct", Tstruct},
@@ -765,7 +765,7 @@ static Tok *toknext()
line++;
next();
t = mktok(Tendln);
- } else if (isalpha(c) || c == '_') {
+ } else if (isalpha(c) || c == '_' || c == '$') {
t = kwident();
} else if (c == '"') {
t = strlit();