commit 08b0f2a554d8e1d8b651ae0d25947104604e5df9
parent d3a0477d93e577b3a2d9e243fc3d3545f180ba85
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date: Fri, 29 Jun 2012 09:32:43 +0200
Changed name of RESTRICTED token to RESTRICT
This allow shorter and cleaner expressions.
Diffstat:
4 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/decl.c b/decl.c
@@ -104,7 +104,7 @@ static struct type *specifier(void)
if (!(tqlf ^= T_CONST))
goto duplicated_qlf;
continue;
- case RESTRICTED:
+ case RESTRICT:
if (!(tqlf ^= T_RESTRICTED))
goto duplicated_qlf;
continue;
@@ -137,7 +137,7 @@ static struct type *specifier(void)
return t;
} else if (tqlf) {
if (tqlf & T_CONST) pushtype(CONST);
- if (tqlf & T_RESTRICTED) pushtype(RESTRICTED);
+ if (tqlf & T_RESTRICTED) pushtype(RESTRICT);
if (tqlf & T_VOLATILE) pushtype(VOLATILE);
return decl_type(t);
} else if (nested_level == 0 && yytoken == IDEN) {
@@ -211,7 +211,7 @@ static void declarator(void)
if (!(*bp ^= T_CONST))
goto duplicated;
goto repeat_qlf;
- case RESTRICTED:
+ case RESTRICT:
if (!(*bp ^= T_RESTRICTED))
goto duplicated;
goto repeat_qlf;
@@ -231,7 +231,7 @@ static void declarator(void)
while (bp-- != qlf) {
if (*bp & T_CONST) pushtype(CONST);
- if (*bp & T_RESTRICTED) pushtype(RESTRICTED);
+ if (*bp & T_RESTRICTED) pushtype(RESTRICT);
if (*bp & T_VOLATILE) pushtype(VOLATILE);
pushtype(PTR);
}
diff --git a/keyword.c b/keyword.c
@@ -28,7 +28,7 @@ static struct keyword {
"int", INT,
"long", LONG,
"register", REGISTER,
- "restricted", RESTRICTED,
+ "restricted", RESTRICT,
"return", RETURN,
"short", SHORT,
"signed", SIGNED,
diff --git a/tokens.h b/tokens.h
@@ -13,7 +13,7 @@ enum tokens {
/* storage specifier */
TYPEDEF, EXTERN, STATIC, AUTO, REGISTER,
/* type qualifier */
- VOLATILE, CONST, RESTRICTED,
+ VOLATILE, CONST, RESTRICT,
/* sign specifier */
UNSIGNED, SIGNED,
/* other tokens */
diff --git a/types.c b/types.c
@@ -50,7 +50,7 @@ struct type *mktype(register struct type *base, unsigned char op)
{
register struct type **ptr, *nt;
assert(op == PTR || op == ARY || op == FTN ||
- op == VOLATILE || op == RESTRICTED || op == CONST);
+ op == VOLATILE || op == RESTRICT || op == CONST);
switch (op) {
case PTR:
@@ -65,7 +65,7 @@ struct type *mktype(register struct type *base, unsigned char op)
case VOLATILE:
ptr = &base->vltl;
break;
- case RESTRICTED:
+ case RESTRICT:
ptr = &base->rstr;
break;
case CONST:
@@ -106,7 +106,7 @@ void ptype(register struct type *t)
fputs("volatile ", stdout);
break;
break;
- case RESTRICTED:
+ case RESTRICT:
fputs("restricted ", stdout);
break;
case CONST: