diff options
author | Quentin Carbonneaux <quentin.carbonneaux@yale.edu> | 2016-08-14 20:03:39 -0700 |
---|---|---|
committer | Quentin Carbonneaux <quentin.carbonneaux@yale.edu> | 2016-08-14 20:03:39 -0700 |
commit | 5ad8a2c6fe90554bb6ad425597be732328fe0e41 (patch) | |
tree | a078eff73cae72eac7313b20dbd48a0ae1970904 | |
parent | 8ca73af85a2351b99e0d19564548dd35ccf61011 (diff) | |
download | roux-5ad8a2c6fe90554bb6ad425597be732328fe0e41.tar.gz |
couple of case fixes in tokens
-rw-r--r-- | parse.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/parse.c b/parse.c index 924b5f5..2e7726d 100644 --- a/parse.c +++ b/parse.c @@ -119,8 +119,8 @@ enum { Ttmp, Tlbl, Tglo, - TTyp, - TStr, + Ttyp, + Tstr, Tplus, Teq, @@ -245,7 +245,7 @@ lex() t = Tglo; goto Alpha; case ':': - t = TTyp; + t = Ttyp; goto Alpha; case '#': while ((c=fgetc(inf)) != '\n' && c != EOF) @@ -270,7 +270,7 @@ lex() if (c == '"') if (!i || tokval.str[i-1] != '\\') { tokval.str[i] = 0; - return TStr; + return Tstr; } tokval.str[i] = c; } @@ -419,7 +419,7 @@ parsecls(int *tyn) switch (next()) { default: err("invalid class specifier"); - case TTyp: + case Ttyp: for (i=0; i<ntyp; i++) if (strcmp(tokval.str, typ[i].name) == 0) { *tyn = i; @@ -798,7 +798,7 @@ parsetyp() err("too many type definitions"); ty = &typ[ntyp++]; ty->align = -1; - if (nextnl() != TTyp || nextnl() != Teq) + if (nextnl() != Ttyp || nextnl() != Teq) err("type name, then = expected"); strcpy(ty->name, tokval.str); t = nextnl(); @@ -955,7 +955,7 @@ parsedat(void cb(Dat *), int export) d.u.num = tokval.num; else if (t == Tglo) parsedatref(&d); - else if (t == TStr) + else if (t == Tstr) parsedatstr(&d); else err("constant literal expected"); |