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

Jochen Wezel jwezel@compumaster.de
Mon, 2 Aug 2004 14:30:02 +0200


Hi you both!

Wouldn't you write "#If True Then" (notice the additional word "Then")?

I just see, vbc.exe compiles both line with and without "Then"...
VS.NET automatically adds the word "Then" if it's missing.

CU
Jochen

-----Urspr=FCngliche Nachricht-----
Von: mono-vb-admin@lists.ximian.com =
[mailto:mono-vb-admin@lists.ximian.com] Im Auftrag von Jambunathan =
Jambunathan
Gesendet: Montag, 2. August 2004 14:18
An: rafael@mono-cvs.ximian.com
Cc: mono-vb@lists.ximian.com
Betreff: [mono-vb] Re: [Mono-patches] mcs/mbas ChangeLog,1.148,1.149 =
mb-parser.jay,1.105,1.106

Rafael

Thanks for submitting this patch. Just a small comment:

Subsequent to my pre-processor changes, EOL should no more 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
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

_______________________________________________
Mono-vb mailing list
Mono-vb@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-vb