Bugzilla – Bug 314903
[PARSER]: grammar problem with <, >
Last modified: 2008-07-10 21:13:48 UTC
---- Reported by duncan@ximian.com 2004-05-28 22:35:12 MST ---- mcs compiles this code just fine. With gmcs, we get this error: ALPHA SOFTWARE: Mono C# Compiler 0.91.99.0 for Generics syntax error, got token `OP_GENERICS_LT', expecting AS IS CLOSE_BRACE OPEN_BRACKET CLOSE_BRACKET OPEN_PARENS CLOSE_PARENS DOT COMMA COLON SEMICOLON PLUS MINUS ASSIGN OP_LT OP_GT BITWISE_AND BITWISE_OR STAR PERCENT DIV CARRET INTERR OP_INC OP_DEC OP_SHIFT_LEFT OP_SHIFT_RIGHT OP_LE OP_GE OP_EQ OP_NE OP_AND OP_OR OP_MULT_ASSIGN OP_DIV_ASSIGN OP_MOD_ASSIGN OP_ADD_ASSIGN OP_SUB_ASSIGN OP_SHIFT_LEFT_ASSIGN OP_SHIFT_RIGHT_ASSIGN OP_AND_ASSIGN OP_XOR_ASSIGN OP_OR_ASSIGN OP_PTR ./ICSharpCode.SharpZipLib/Zip/Compression/DeflaterHuffman.cs(713) error CS1002: Expecting `;' Mono.CSharp.yyParser.yyException: irrecoverable syntax error in <0x00886> Mono.CSharp.CSharpParser:yyparse (Mono.CSharp.yyParser.yyInput) in <0x00079> Mono.CSharp.CSharpParser:parse () Line 713 of DeflaterHuffman.cs says: if (storedOffset >= 0 && storedLength+4 < opt_len >> 3) { There shouldn't be an OP_GENERIC_LT there. ---- Additional Comments From martin@ximian.com 2004-06-04 16:43:21 MST ---- As a workaround, just add the ()'s. ---- Additional Comments From atsushi@ximian.com 2005-08-31 13:40:33 MST ---- It does not happen anymore. Maybe we should recover the original #ziplib source? ---- Additional Comments From atsushi@ximian.com 2005-10-18 00:31:24 MST ---- Do we still have this problem? Zoltan updated #ziplib sources in mcs. ---- Additional Comments From miguel@ximian.com 2005-12-30 12:54:29 MST ---- Here is a test case, the bug still exists: class X { static void Main () { int h = 1, o = 2; if (h+4 < o >> 3){ } } } ---- Additional Comments From miguel@ximian.com 2005-12-30 15:39:16 MST ---- *** https://bugzilla.novell.com/show_bug.cgi?id=MONO77032 has been marked as a duplicate of this bug. *** ---- Additional Comments From miguel@ximian.com 2006-01-04 12:28:58 MST ---- The first bug was fixed, the second was not. ---- Additional Comments From duncan@ximian.com 2006-08-17 01:26:16 MST ---- duncan@sandhi:~/bugs> gmcs 59289.cs 59289.cs(6,29): error CS1002: Expecting `;' Compilation failed: 1 error(s), 0 warnings ---- Additional Comments From miguel@ximian.com 2006-10-07 11:31:38 MST ---- I tried fixing this bug last year, and after many attempts I think the only solution is to write a hand parser for this. ---- Additional Comments From marek.safar@seznam.cz 2007-09-08 16:29:50 MST ---- *** https://bugzilla.novell.com/show_bug.cgi?id=MONO82757 has been marked as a duplicate of this bug. *** Unknown operating system unknown. Setting to default OS "Other".
*** Bug 324310 has been marked as a duplicate of this bug. ***
*** Bug 351249 has been marked as a duplicate of this bug. ***
*** Bug 355137 has been marked as a duplicate of this bug. ***
Should be fixed in SVN r107638.
*** Bug 408096 has been marked as a duplicate of this bug. ***