[Mono-bugs] [Bug 46277][Maj] New - #region/#endregion mishandling

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
Sun, 13 Jul 2003 21:39:01 -0400 (EDT)


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 rafaelteixeirabr@hotmail.com.

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

--- shadow/46277	Sun Jul 13 21:39:01 2003
+++ shadow/46277.tmp.2344	Sun Jul 13 21:39:01 2003
@@ -0,0 +1,70 @@
+Bug#: 46277
+Product: Mono/MCS
+Version: unspecified
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Major
+Component: Misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: rafaelteixeirabr@hotmail.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: #region/#endregion mishandling
+
+Please fill in this template when reporting a bug, unless you know what you
+are doing.
+Description of Problem:
+
+Some source files containing subsequent regions generate a Parser Exception
+when compiled by mcs.
+
+Steps to reproduce the problem:
+1. copy the attached source files and then compile with :
+2. mcs BuildException.cs NAntSchemaTask.cs /out:bug  /target:exe
+
+Actual Results:
+
+syntax error, 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 CLOSE_BRACE OPEN_BRACKET TILDE IDENTIFIER
+BuildException.cs(136) error CS8025: : Parsing error
+Mono.CSharp.yyParser.yyException: irrecoverable syntax error
+in <0x00865> 00 Mono.CSharp.CSharpParser:yyparse (Mono.CSharp.yyParser.yyInput)
+in <0x00079> 00 Mono.CSharp.CSharpParser:parse ()
+ 
+syntax error, 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 CLOSE_BRACE OPEN_BRACKET TILDE IDENTIFIER
+NAntSchemaTask.cs(106) error CS8025: : Parsing error
+Mono.CSharp.yyParser.yyException: irrecoverable syntax error
+in <0x00865> 00 Mono.CSharp.CSharpParser:yyparse (Mono.CSharp.yyParser.yyInput)
+in <0x00079> 00 Mono.CSharp.CSharpParser:parse ()
+ 
+Compilation failed: 2 error(s), 0 warnings
+
+
+Expected Results:
+
+Compilation Sucessfull
+
+How often does this happen? 
+
+Always, except if I comment out some specific pairs of #region/#endregion
+
+Additional Information:
+
+I compiled verbosely and followed the rules on the cs-parser.jay file, and
+they are OK. It seems as a problem in the tokenizer, that handles these
+directives. As said commenting out the pair of directives around the
+appointed errors makes the parsing pass finish.
+
+These files are from Nant-0.8.2 on sourceforge.