`super' is now a keyword

This commit is contained in:
Bill Currie 2002-05-17 19:47:15 +00:00
parent 451bfbddfe
commit dc5cd8460e
2 changed files with 6 additions and 1 deletions

View File

@ -243,6 +243,8 @@ static keyword_t keywords[] = {
{"integer", TYPE, &type_integer, 0, PROG_VERSION}, {"integer", TYPE, &type_integer, 0, PROG_VERSION},
{"function", TYPE, &type_function, 0, PROG_VERSION}, {"function", TYPE, &type_function, 0, PROG_VERSION},
{"id", TYPE, &type_id, 0, PROG_VERSION}, {"id", TYPE, &type_id, 0, PROG_VERSION},
{"SEL", TYPE, &type_SEL, 0, PROG_VERSION},
{"IMP", TYPE, &type_IMP, 0, PROG_VERSION},
{"local", LOCAL, 0, 1, PROG_ID_VERSION}, {"local", LOCAL, 0, 1, PROG_ID_VERSION},
{"return", RETURN, 0, 1, PROG_ID_VERSION}, {"return", RETURN, 0, 1, PROG_ID_VERSION},
{"while", WHILE, 0, 1, PROG_ID_VERSION}, {"while", WHILE, 0, 1, PROG_ID_VERSION},
@ -259,6 +261,7 @@ static keyword_t keywords[] = {
{"struct", STRUCT, 0, 0, PROG_VERSION}, {"struct", STRUCT, 0, 0, PROG_VERSION},
{"enum", ENUM, 0, 0, PROG_ID_VERSION}, {"enum", ENUM, 0, 0, PROG_ID_VERSION},
{"typedef", TYPEDEF, 0, 0, PROG_ID_VERSION}, {"typedef", TYPEDEF, 0, 0, PROG_ID_VERSION},
{"super", SUPER, 0, 0, PROG_VERSION},
{"@class", CLASS, 0, 0, PROG_VERSION}, {"@class", CLASS, 0, 0, PROG_VERSION},
{"@defs", DEFS, 0, 0, PROG_VERSION}, {"@defs", DEFS, 0, 0, PROG_VERSION},

View File

@ -113,7 +113,7 @@ void free_local_inits (hashtab_t *def_list);
%token LOCAL RETURN WHILE DO IF ELSE FOR BREAK CONTINUE ELLIPSIS NIL %token LOCAL RETURN WHILE DO IF ELSE FOR BREAK CONTINUE ELLIPSIS NIL
%token IFBE IFB IFAE IFA %token IFBE IFB IFAE IFA
%token SWITCH CASE DEFAULT STRUCT ENUM TYPEDEF %token SWITCH CASE DEFAULT STRUCT ENUM TYPEDEF SUPER
%token ELE_START %token ELE_START
%token <type> TYPE %token <type> TYPE
@ -1198,6 +1198,7 @@ reserved_word
| STRUCT { $$ = strdup (yytext); } | STRUCT { $$ = strdup (yytext); }
| ENUM { $$ = strdup (yytext); } | ENUM { $$ = strdup (yytext); }
| TYPEDEF { $$ = strdup (yytext); } | TYPEDEF { $$ = strdup (yytext); }
| SUPER { $$ = strdup (yytext); }
; ;
keyworddecl keyworddecl
@ -1225,6 +1226,7 @@ obj_messageexpr
receiver receiver
: expr : expr
| SUPER { $$ = new_name_expr ("super"); }
; ;
messageargs messageargs