Bug 314903 (MONO59289) - [PARSER]: grammar problem with <, >
Summary: [PARSER]: grammar problem with <, >
Status: RESOLVED FIXED
: MONO81634 351249 355137 408096 (view as bug list)
Alias: MONO59289
Product: Mono: Compilers
Classification: Mono
Component: C# (show other bugs)
Version: unspecified
Hardware: Other Other
: P3 - Medium : Normal
Target Milestone: ---
Assignee: Mono Bugs
QA Contact: Mono Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-05-29 05:35 UTC by Duncan Mak
Modified: 2008-07-10 21:13 UTC (History)
4 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Wiest 2007-09-15 18:39:56 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".

Comment 1 Marek Safar 2007-11-05 13:14:55 UTC
*** Bug 324310 has been marked as a duplicate of this bug. ***
Comment 2 Marek Safar 2008-01-03 12:33:34 UTC
*** Bug 351249 has been marked as a duplicate of this bug. ***
Comment 3 Marek Safar 2008-01-21 16:32:31 UTC
*** Bug 355137 has been marked as a duplicate of this bug. ***
Comment 4 Raja Harinath 2008-07-10 13:35:46 UTC
Should be fixed in SVN r107638.
Comment 5 Marek Safar 2008-07-10 21:13:48 UTC
*** Bug 408096 has been marked as a duplicate of this bug. ***