Bug 31572 - Enabling YYDEBUG and jsyydebug to debug during parsing causes a compile error.
Summary: Enabling YYDEBUG and jsyydebug to debug during parsing causes a compile error.
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Linux
: P2 Enhancement
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-11-16 18:26 PST by Chris
Modified: 2012-03-01 18:27 PST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chris 2009-11-16 18:26:19 PST
Enabling YYDEBUG and jsyydebug for debugging during parsing causes a compile error.

Change the two defines in Grammar.y:

#define YYDEBUG 1 // Set to 1 to debug a parse error.
#define jscyydebug 1 // Set to 1 to debug a parse error.

rebuild:

generated/release/Grammar.tab.c:2427: error: expected unqualified-id before numeric constant

Tested on todays nightly, r50918 and an older version I had laying around (r43808), same errors. Also tested with gcc 4.4.1 and 4.3.2.
Comment 1 Alexey Proskuryakov 2009-11-17 11:45:32 PST
Why is this a WebKit bug? We don't have YYDEBUG enabled, so this doesn't affect anyone.

I think that we would accept a patch that adds support for building with YYDEBUG enabled, if you intend to submit one as an enhancement.
Comment 2 Chris 2009-11-17 12:09:48 PST
(In reply to comment #1)
> Why is this a WebKit bug? We don't have YYDEBUG enabled, so this doesn't affect
> anyone.

I was under the impression that being able to debug JS parsing would be desired just as much as compiling a debug version of webkit. If it's not, that's fine too.
Comment 3 Gavin Barraclough 2012-03-01 18:27:16 PST
Might have been a good idea, but we now no longer use a yacc based grammar. :-)