[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[dotgnu-pnet-commits] pnet ChangeLog cscc/csharp/cs_grammar.y
From: |
Klaus Treichel |
Subject: |
[dotgnu-pnet-commits] pnet ChangeLog cscc/csharp/cs_grammar.y |
Date: |
Thu, 02 Oct 2008 14:23:38 +0000 |
CVSROOT: /cvsroot/dotgnu-pnet
Module name: pnet
Changes by: Klaus Treichel <ktreichel> 08/10/02 14:23:38
Modified files:
. : ChangeLog
cscc/csharp : cs_grammar.y
Log message:
Fix some shift/reduce conflicts.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/pnet/ChangeLog?cvsroot=dotgnu-pnet&r1=1.3571&r2=1.3572
http://cvs.savannah.gnu.org/viewcvs/pnet/cscc/csharp/cs_grammar.y?cvsroot=dotgnu-pnet&r1=1.83&r2=1.84
Patches:
Index: ChangeLog
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/ChangeLog,v
retrieving revision 1.3571
retrieving revision 1.3572
diff -u -b -r1.3571 -r1.3572
--- ChangeLog 1 Oct 2008 19:10:31 -0000 1.3571
+++ ChangeLog 2 Oct 2008 14:23:36 -0000 1.3572
@@ -1,3 +1,8 @@
+2008-10-02 Klaus Treichel <address@hidden>
+
+ * cscc/csharp/cs_grammar.y: Fix some shift/reduce conflicts and the
+ bison warning about OptSpecificCatchClauses.
+
2008-10-01 Klaus Treichel <address@hidden>
* engine/cvm.h (COP_PREFIX_PROFILE_START, COP_PREFIX_PROFILE_END): Add
Index: cscc/csharp/cs_grammar.y
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/cscc/csharp/cs_grammar.y,v
retrieving revision 1.83
retrieving revision 1.84
diff -u -b -r1.83 -r1.84
--- cscc/csharp/cs_grammar.y 23 Oct 2007 18:32:20 -0000 1.83
+++ cscc/csharp/cs_grammar.y 2 Oct 2008 14:23:37 -0000 1.84
@@ -2,7 +2,7 @@
/*
* cs_grammar.y - Input file for yacc that defines the syntax of C#.
*
- * Copyright (C) 2001, 2002, 2003 Southern Storm Software, Pty Ltd.
+ * Copyright (C) 2001, 2002, 2003, 2008 Southern Storm Software, Pty Ltd.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -1211,7 +1211,7 @@
%type <node> ForInitializer ForInitializerInner ForCondition
%type <node> ForIterator ForeachExpression ExpressionStatementList
%type <node> JumpStatement TryStatement CatchClauses LineStatement
-%type <node> OptSpecificCatchClauses SpecificCatchClauses
+%type <node> SpecificCatchClauses
%type <node> SpecificCatchClause OptGeneralCatchClause
%type <node> GeneralCatchClause FinallyClause LockStatement
%type <node> UsingStatement ResourceAcquisition FixedStatement
@@ -1271,13 +1271,14 @@
%type <constraint> TypeParameterConstraints
%type <node> TypeParameterConstraintsClause
%type <nodeList> TypeParameterConstraintsClauses
+%type <nodeList> OptTypeParameterConstraintsClauses
%type <classHeader> ClassHeader InterfaceHeader StructHeader
%type <memberHeader> MethodHeader DelegateHeader InterfaceMethodHeader
%type <indexer> IndexerDeclarator
%type <catchinfo> CatchNameInfo
%type <target> AttributeTarget
-%expect 30
+%expect 21
%start CompilationUnit
%%
@@ -2850,25 +2851,12 @@
}
$$ = $1;
}
- | OptSpecificCatchClauses GeneralCatchClause {
- if($1)
- {
- ILNode_List_Add($1, $2);
- $$ = $1;
- }
- else
- {
+ | GeneralCatchClause {
$$ = ILNode_CatchClauses_create();
- ILNode_List_Add($$, $2);
- }
+ ILNode_List_Add($$, $1);
}
;
-OptSpecificCatchClauses
- : /* empty */ { $$ = 0; }
- | SpecificCatchClauses { $$ = $1; }
- ;
-
SpecificCatchClauses
: SpecificCatchClause {
$$ = ILNode_CatchClauses_create();
@@ -2887,12 +2875,7 @@
;
CatchNameInfo
- : /* nothing */ {
- $$.type=ILNode_Identifier_create("Exception");
- $$.id = 0;
- $$.idNode = 0;
- }
- | '(' Type Identifier ')' {
+ : '(' Type Identifier ')' {
$$.type = $2;
$$.id = ILQualIdentName($3, 0);
$$.idNode = $3;
@@ -3191,7 +3174,7 @@
$$.typeFormals = 0;
}
| OptAttributes OptModifiers OptPartial CLASS GenericIdentifierStart
- TypeFormals ClassBase TypeParameterConstraintsClauses {
+ TypeFormals ClassBase
OptTypeParameterConstraintsClauses {
#if IL_VERSION_MAJOR > 1
$$.attributes = $1;
$$.modifiers = $2;
@@ -3350,9 +3333,13 @@
}
;
-TypeParameterConstraintsClauses
+OptTypeParameterConstraintsClauses
: /* EMPTY */ { $$ = 0; }
- | TypeParameterConstraintsClause { $$ = (ILNode_List
*)MakeList(0, $1); }
+ | TypeParameterConstraintsClauses { $$ = $1; }
+ ;
+
+TypeParameterConstraintsClauses
+ : TypeParameterConstraintsClause { $$ = (ILNode_List
*)MakeList(0, $1); }
| TypeParameterConstraintsClauses TypeParameterConstraintsClause
{
$$ = (ILNode_List
*)MakeList((ILNode *)$1, $2);
}
@@ -3596,7 +3583,7 @@
$$.typeFormals = 0;
}
| OptAttributes OptModifiers Type NonGenericQualifiedIdentifier '<'
TypeFormals
- '(' OptFormalParameterList ')'
TypeParameterConstraintsClauses {
+ '(' OptFormalParameterList ')'
OptTypeParameterConstraintsClauses {
$$.attributes = $1;
$$.modifiers = $2;
$$.type = $3;
@@ -4296,7 +4283,7 @@
$$.typeFormals = 0;
}
| OptAttributes OptModifiers OptPartial STRUCT GenericIdentifierStart
- TypeFormals StructInterfaces
TypeParameterConstraintsClauses {
+ TypeFormals StructInterfaces
OptTypeParameterConstraintsClauses {
#if IL_VERSION_MAJOR > 1
$$.attributes = $1;
$$.modifiers = $2;
@@ -4400,7 +4387,7 @@
$$.typeFormals = 0;
}
| OptAttributes OptModifiers OptPartial INTERFACE GenericIdentifierStart
- TypeFormals InterfaceBase
TypeParameterConstraintsClauses {
+ TypeFormals InterfaceBase
OptTypeParameterConstraintsClauses {
#if IL_VERSION_MAJOR > 1
$$.attributes = $1;
$$.modifiers = $2;
@@ -4514,7 +4501,7 @@
$$.typeFormals = 0;
}
| OptAttributes OptNew Type GenericIdentifierStart TypeFormals
- '(' OptFormalParameterList ')'
TypeParameterConstraintsClauses {
+ '(' OptFormalParameterList ')'
OptTypeParameterConstraintsClauses {
#if IL_VERSION_MAJOR > 1
$$.attributes = $1;
$$.modifiers = $2;
@@ -4783,7 +4770,7 @@
$$.typeFormals = 0;
}
| OptAttributes OptModifiers DELEGATE Type GenericIdentifierStart
TypeFormals
- '(' OptFormalParameterList ')'
TypeParameterConstraintsClauses {
+ '(' OptFormalParameterList ')'
OptTypeParameterConstraintsClauses {
#if IL_VERSION_MAJOR > 1
$$.attributes = $1;
$$.modifiers = $2;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [dotgnu-pnet-commits] pnet ChangeLog cscc/csharp/cs_grammar.y,
Klaus Treichel <=