[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Dotgnu-pnet-commits] CVS: pnet/cscc/c c_grammar.y,1.60,1.61
From: |
Rhys Weatherley <address@hidden> |
Subject: |
[Dotgnu-pnet-commits] CVS: pnet/cscc/c c_grammar.y,1.60,1.61 |
Date: |
Wed, 09 Jul 2003 01:55:32 -0400 |
Update of /cvsroot/dotgnu-pnet/pnet/cscc/c
In directory subversions:/tmp/cvs-serv3159/cscc/c
Modified Files:
c_grammar.y
Log Message:
Add some "error" declarations to the C grammar to improve error
handling in the parser.
Index: c_grammar.y
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/cscc/c/c_grammar.y,v
retrieving revision 1.60
retrieving revision 1.61
diff -C2 -r1.60 -r1.61
*** c_grammar.y 3 Jul 2003 02:22:40 -0000 1.60
--- c_grammar.y 9 Jul 2003 05:55:30 -0000 1.61
***************
*** 1322,1325 ****
--- 1322,1326 ----
| '(' Expression ')' { $$ = $2; }
| '(' CompoundStatement ')' { $$ = $2; }
+ | '(' error ')' { $$ = ILNode_Error_create(); }
;
***************
*** 2021,2024 ****
--- 2022,2026 ----
: EnumeratorListNoComma
| EnumeratorListNoComma ','
+ | error
;
***************
*** 2556,2559 ****
--- 2558,2562 ----
| JumpStatement
| AsmStatement
+ | error ';' { $$ = ILNode_Empty_create(); }
;
***************
*** 2745,2748 ****
--- 2748,2754 ----
}
| Declaration { /* Nothing to do here */ }
+ | error ';'
+ | error '}'
+ | ';'
;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Dotgnu-pnet-commits] CVS: pnet/cscc/c c_grammar.y,1.60,1.61,
Rhys Weatherley <address@hidden> <=