[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Dotgnu-pnet-commits] CVS: pnet/cscc/csharp cs_grammar.y,1.46,1.47
From: |
Rhys Weatherley <address@hidden> |
Subject: |
[Dotgnu-pnet-commits] CVS: pnet/cscc/csharp cs_grammar.y,1.46,1.47 |
Date: |
Thu, 20 Feb 2003 20:53:41 -0500 |
Update of /cvsroot/dotgnu-pnet/pnet/cscc/csharp
In directory subversions:/tmp/cvs-serv9239/cscc/csharp
Modified Files:
cs_grammar.y
Log Message:
Integrate generic type indicators like "A<T>" into the expression syntax.
Index: cs_grammar.y
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/cscc/csharp/cs_grammar.y,v
retrieving revision 1.46
retrieving revision 1.47
diff -C2 -r1.46 -r1.47
*** cs_grammar.y 18 Feb 2003 05:25:07 -0000 1.46
--- cs_grammar.y 21 Feb 2003 01:53:39 -0000 1.47
***************
*** 913,917 ****
%type <target> AttributeTarget
! %expect 21
%start CompilationUnit
--- 913,917 ----
%type <target> AttributeTarget
! %expect 25
%start CompilationUnit
***************
*** 1342,1348 ****
*/
- /* TODO: Identifier '<' TypeActuals '>' for generic type references.
- A bit problematic at the moment due to reduce/reduce issues */
-
PrimaryExpression
: LiteralExpression { $$ = $1; }
--- 1342,1345 ----
***************
*** 1641,1644 ****
--- 1638,1646 ----
;
+ /*
+ * Relational expressions also recognise generic type references.
+ * We have to put them here instead of in the more logical place
+ * of "PrimaryExpression" to prevent reduce/reduce conflicts.
+ */
RelationalExpression
: ShiftExpression { $$ = $1; }
***************
*** 1660,1663 ****
--- 1662,1690 ----
| RelationalExpression AS Type {
MakeBinary(AsUntyped, $1, $3);
+ }
+ | RelationalExpression '<' ShiftExpression '>' {
+ /* TODO: generic type reference */
+ $$ = $1;
+ }
+ | RelationalExpression '<' ShiftExpression TypeSuffixList '>' {
+ /* TODO: generic type reference */
+ $$ = $1;
+ }
+ | RelationalExpression '<' ShiftExpression ',' TypeActuals '>' {
+ /* TODO: generic type reference */
+ $$ = $1;
+ }
+ | RelationalExpression '<' ShiftExpression TypeSuffixList ','
+ TypeActuals '>' {
+ /* TODO: generic type reference */
+ $$ = $1;
+ }
+ | RelationalExpression '<' BuiltinType TypeSuffixes '>' {
+ /* TODO: generic type reference */
+ $$ = $1;
+ }
+ | RelationalExpression '<' BuiltinType TypeSuffixes ',' TypeActuals '>'
{
+ /* TODO: generic type reference */
+ $$ = $1;
}
;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Dotgnu-pnet-commits] CVS: pnet/cscc/csharp cs_grammar.y,1.46,1.47,
Rhys Weatherley <address@hidden> <=