mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-05-06 07:51:18 +00:00
Minimal error recovery.
No more bailing on the first syntax error. While the recovery is not perfect (things can get right twisted), qfcc will now continue parsing after a syntax error.
This commit is contained in:
parent
a4635d79e8
commit
dc5bafb8fb
1 changed files with 4 additions and 0 deletions
|
@ -225,6 +225,9 @@ defs
|
||||||
: /* empty */
|
: /* empty */
|
||||||
| defs {if (current_class) PARSE_ERROR;} def
|
| defs {if (current_class) PARSE_ERROR;} def
|
||||||
| defs obj_def
|
| defs obj_def
|
||||||
|
| error END { current_class = 0; yyerrok; }
|
||||||
|
| error ';' { yyerrok; }
|
||||||
|
| error '}' { yyerrok; }
|
||||||
;
|
;
|
||||||
|
|
||||||
def
|
def
|
||||||
|
@ -796,6 +799,7 @@ statements
|
||||||
|
|
||||||
statement
|
statement
|
||||||
: ';' { $$ = 0; }
|
: ';' { $$ = 0; }
|
||||||
|
| error ';' { $$ = 0; yyerrok; }
|
||||||
| statement_block { $$ = $1; }
|
| statement_block { $$ = $1; }
|
||||||
| RETURN opt_expr ';'
|
| RETURN opt_expr ';'
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue