[Mono-bugs] [Bug 69299][Nor] Changed - parsing problem with \r

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Tue, 9 Nov 2004 20:21:11 -0500 (EST)


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by bmaurer@users.sf.net.

http://bugzilla.ximian.com/show_bug.cgi?id=69299

--- shadow/69299	2004-11-09 20:18:04.000000000 -0500
+++ shadow/69299.tmp.3064	2004-11-09 20:21:11.000000000 -0500
@@ -1,23 +1,23 @@
 Bug#: 69299
 Product: Mono: Compilers
 Version: 1.0
-OS: 
+OS: unknown
 OS Details: 
 Status: NEW   
 Resolution: 
-Severity: 
+Severity: Unknown
 Priority: Normal
 Component: C#
 AssignedTo: mono-bugs@ximian.com                            
 ReportedBy: bmaurer@users.sf.net               
 QAContact: mono-bugs@ximian.com
 TargetMilestone: ---
 URL: 
 Cc: 
-Summary: class Foo { #region foo bar #endregion }
+Summary: parsing problem with \r
 
 Code:
 
 class Foo {
 
 #region foo bar
@@ -29,6 +29,31 @@
 [benm@omega benm]$ mcs t.cs
 syntax error, got token `EOF', expecting ABSTRACT BOOL BYTE CHAR CLASS
 CONST DECIMAL DELEGATE DOUBLE ENUM EVENT EXPLICIT EXTERN FLOAT IMPLICIT INT
 INTERFACE INTERNAL LONG NEW OBJECT OVERRIDE PRIVATE PROTECTED PUBLIC
 READONLY SBYTE SEALED SHORT STATIC STRING STRUCT UINT ULONG UNSAFE USHORT
 VIRTUAL VOID VOLATILE PARTIAL CLOSE_BRACE OPEN_BRACKET TILDE IDENTIFIER
+
+------- Additional Comments From bmaurer@users.sf.net  2004-11-09 20:21 -------
+The issue here is line endings
+
+[benm@omega benm]$ hexdump -C t.cs
+00000000  63 6c 61 73 73 20 46 6f  6f 20 7b 0d 23 72 65 67  |class Foo
+{.#reg|
+00000010  69 6f 6e 20 66 6f 6f 20  62 61 72 0d 23 65 6e 64  |ion foo
+bar.#end|
+00000020  72 65 67 69 6f 6e 0d 7d                           |region.}|
+00000028
+
+<kangaroo> BenM: I'm ~95% sure its the fact that its \r
+<kangaroo> without \n
+<shaver> seriously
+<phillipc> I think you're right
+<BenM> hold on
+<kangaroo> while ((c != -1) && (c != '\n') && (c != ' ') && (c !=
+'\t') && (c != '\r')){
+<BenM> ah
+<kangaroo> in get_cmd_arg
+<kangaroo> of cs-tokenizer.cs
+<kangaroo> it keeps parsing past \r thinking its still in the token
+<kangaroo> until it gets a \n
+