ref: 08b0f2a554d8e1d8b651ae0d25947104604e5df9
parent: d3a0477d93e577b3a2d9e243fc3d3545f180ba85
author: Roberto E. Vargas Caballero <[email protected]>
date: Fri Jun 29 05:32:43 EDT 2012
Changed name of RESTRICTED token to RESTRICT This allow shorter and cleaner expressions.
--- a/decl.c
+++ b/decl.c
@@ -104,7 +104,7 @@
if (!(tqlf ^= T_CONST))
goto duplicated_qlf;
continue;
- case RESTRICTED:
+ case RESTRICT:
if (!(tqlf ^= T_RESTRICTED))
goto duplicated_qlf;
continue;
@@ -137,7 +137,7 @@
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 @@
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 @@
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);
}
--- a/keyword.c
+++ b/keyword.c
@@ -28,7 +28,7 @@
"int", INT,
"long", LONG,
"register", REGISTER,
- "restricted", RESTRICTED,
+ "restricted", RESTRICT,
"return", RETURN,
"short", SHORT,
"signed", SIGNED,
--- a/tokens.h
+++ b/tokens.h
@@ -13,7 +13,7 @@
/* storage specifier */
TYPEDEF, EXTERN, STATIC, AUTO, REGISTER,
/* type qualifier */
- VOLATILE, CONST, RESTRICTED,
+ VOLATILE, CONST, RESTRICT,
/* sign specifier */
UNSIGNED, SIGNED,
/* other tokens */
--- a/types.c
+++ b/types.c
@@ -50,7 +50,7 @@
{
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 @@
case VOLATILE:
ptr = &base->vltl;
break;
- case RESTRICTED:
+ case RESTRICT:
ptr = &base->rstr;
break;
case CONST:
@@ -106,7 +106,7 @@
fputs("volatile ", stdout);
break;
break;
- case RESTRICTED:
+ case RESTRICT:
fputs("restricted ", stdout);
break;
case CONST: