From dc5cd8460e8f175219ce7748fcb1e10544a5553a Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Fri, 17 May 2002 19:47:15 +0000 Subject: [PATCH] `super' is now a keyword --- tools/qfcc/source/qc-lex.l | 3 +++ tools/qfcc/source/qc-parse.y | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/tools/qfcc/source/qc-lex.l b/tools/qfcc/source/qc-lex.l index 2bbbcfcc9..de478fc3a 100644 --- a/tools/qfcc/source/qc-lex.l +++ b/tools/qfcc/source/qc-lex.l @@ -243,6 +243,8 @@ static keyword_t keywords[] = { {"integer", TYPE, &type_integer, 0, PROG_VERSION}, {"function", TYPE, &type_function, 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}, {"return", RETURN, 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}, {"enum", ENUM, 0, 0, PROG_ID_VERSION}, {"typedef", TYPEDEF, 0, 0, PROG_ID_VERSION}, + {"super", SUPER, 0, 0, PROG_VERSION}, {"@class", CLASS, 0, 0, PROG_VERSION}, {"@defs", DEFS, 0, 0, PROG_VERSION}, diff --git a/tools/qfcc/source/qc-parse.y b/tools/qfcc/source/qc-parse.y index 91cf03118..d3c5c4eea 100644 --- a/tools/qfcc/source/qc-parse.y +++ b/tools/qfcc/source/qc-parse.y @@ -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 IFBE IFB IFAE IFA -%token SWITCH CASE DEFAULT STRUCT ENUM TYPEDEF +%token SWITCH CASE DEFAULT STRUCT ENUM TYPEDEF SUPER %token ELE_START %token TYPE @@ -1198,6 +1198,7 @@ reserved_word | STRUCT { $$ = strdup (yytext); } | ENUM { $$ = strdup (yytext); } | TYPEDEF { $$ = strdup (yytext); } + | SUPER { $$ = strdup (yytext); } ; keyworddecl @@ -1225,6 +1226,7 @@ obj_messageexpr receiver : expr + | SUPER { $$ = new_name_expr ("super"); } ; messageargs