[mono-vb] Re: [Mono-patches] mcs/mbas ChangeLog,1.148,1.149 mb-parser.jay,1.105,1.106

Jambunathan Jambunathan kjambunathan@novell.com
Mon, 02 Aug 2004 06:18:00 -0600


Rafael

Thanks for submitting this patch. Just a small comment:

Subsequent to my pre-processor changes, EOL should no more=20
be used. Instead logical_end_of_line should be used. Adhering to
this would ensure that that the pre-processor statements can follow
any EOL.

For example,

With rules as defined currently, the following sample fails to compile.

Imports System

Module Test
    Sub Main()
        100:
        #If True
              Console.WriteLine("Hello World")
       #End If
    End Sub
End Module

Regards,
Jambunathan K.

>>> Rafael Teixeira <rafael@mono-cvs.ximian.com> 8/1/2004 6:54:14 PM >>>
Update of /cvs/public/mcs/mbas
In directory mono-cvs.ximian.com:/tmp/cvs-serv12894

Modified Files:
	ChangeLog mb-parser.jay=20
Log Message:
2004/08/01  Rafael Teixeira <rafaelteixeirabr@hotmail.com>
	* mb-parser.jay : Revised patch from Jo=C3=A3o Viegas for the =
labeled_statement accepting integer literals as labels


Index: ChangeLog
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /cvs/public/mcs/mbas/ChangeLog,v
retrieving revision 1.148
retrieving revision 1.149
diff -u -d -r1.148 -r1.149
--- ChangeLog	30 Jul 2004 14:43:41 -0000	1.148
+++ ChangeLog	1 Aug 2004 13:24:11 -0000	1.149
@@ -1,3 +1,6 @@
+2004/08/01  Rafael Teixeira <rafaelteixeirabr@hotmail.com>
+	* mb-parser.jay : Revised patch from Jo=C3=A3o Viegas for the =
labeled_statement accepting integer literals as labels
+
 2004-07-30  Jambunathan K  <kjambunathan@novell.com>
 	* mb-parser.jay: Oops. Reversed unintended checkin.
 	* mb-tokenizer.cs: Added comment in Tokenizer()=20

Index: mb-parser.jay
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /cvs/public/mcs/mbas/mb-parser.jay,v
retrieving revision 1.105
retrieving revision 1.106
diff -u -d -r1.105 -r1.106
--- mb-parser.jay	30 Jul 2004 14:43:41 -0000	1.105
+++ mb-parser.jay	1 Aug 2004 13:24:11 -0000	1.106
@@ -2302,9 +2302,21 @@
 		$$ =3D $2;
 	  }
 	;
+label_name
+	: identifier
+	| LITERAL_INTEGER
+	{
+		$$ =3D $1.ToString();
+	}
+	;
+
+opt_linebreak
+	: /* empty */
+	| EOL
+	;
=20
 labeled_statement
-	: identifier COLON end_of_stmt=20
+	: label_name COLON opt_linebreak=20
 	  {
 		LabeledStatement labeled =3D new LabeledStatement =
((string) $1, lexer.Location);
=20
@@ -2443,7 +2455,7 @@
 	;
 	       =20
 goto_statement
-	: GOTO identifier =20
+	: GOTO label_name =20
 	  {
 		$$ =3D new Goto (current_block, (string) $2, lexer.Location=
);
 	  }

_______________________________________________
Mono-patches maillist  -  Mono-patches@ximian.com=20
http://lists.ximian.com/mailman/listinfo/mono-patches