overload "break" and allow break to be used in --traditional

This commit is contained in:
Bill Currie 2007-04-06 11:46:21 +00:00 committed by Jeff Teunissen
parent 6d21c50dee
commit a6388ee680
2 changed files with 2 additions and 1 deletions

View file

@ -284,7 +284,7 @@ static keyword_t keywords[] = {
{"if", IF, 0, 1, PROG_ID_VERSION},
{"else", ELSE, 0, 1, PROG_ID_VERSION},
{"for", FOR, 0, 0, PROG_ID_VERSION},
{"break", BREAK, 0, 0, PROG_ID_VERSION},
{"break", BREAK, 0, 1, PROG_ID_VERSION},
{"continue", CONTINUE, 0, 0, PROG_ID_VERSION},
{"switch", SWITCH, 0, 0, PROG_ID_VERSION},
{"case", CASE, 0, 0, PROG_ID_VERSION},

View file

@ -1152,6 +1152,7 @@ string_val
identifier
: NAME
| BREAK { $$ = save_string ("break"); }
| CLASS_NAME
| TYPE_NAME { $$ = $1->name; }
;