RESOLVED FIXED 97896
YYDEBUG doesn't print token values
https://bugs.webkit.org/show_bug.cgi?id=97896
Summary YYDEBUG doesn't print token values
Glenn Adams
Reported 2012-09-28 05:12:54 PDT
When debugging CSS lexer/parser with YYDEBUG set to 1, token values are not output because YYPRINT macro is a NO-OP.
Attachments
Patch (1.71 KB, patch)
2012-09-28 05:21 PDT, Glenn Adams
no flags
Glenn Adams
Comment 1 2012-09-28 05:21:47 PDT
Simon Fraser (smfr)
Comment 2 2012-09-29 22:03:38 PDT
Comment on attachment 166222 [details] Patch Does this have any behavior or performance implications?
Glenn Adams
Comment 3 2012-09-29 22:10:57 PDT
(In reply to comment #2) > (From update of attachment 166222 [details]) > Does this have any behavior or performance implications? no; YYDEBUG is defined as 0 in CSSGrammar.y and CSSParser.cpp at present; in order to use YYDEBUG feature, e.g., for special debugging, one has to explicitly change the setting of YYDEBUG to 1 in these two files; if one does define as 1, then normal YYDEBUG functions work as expected except that token values aren't printed; this patch simply enables output of token values when one sets YYDEBUG to 1;
WebKit Review Bot
Comment 4 2012-10-01 12:09:16 PDT
Comment on attachment 166222 [details] Patch Clearing flags on attachment: 166222 Committed r130063: <http://trac.webkit.org/changeset/130063>
WebKit Review Bot
Comment 5 2012-10-01 12:09:20 PDT
All reviewed patches have been landed. Closing bug.
Darin Adler
Comment 6 2012-10-01 14:31:23 PDT
Comment on attachment 166222 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=166222&action=review > Source/WebCore/css/CSSGrammar.y:1744 > + YYFPRINTF(yyoutput, "%s", ((String)yyvalue.string).utf8().data()); I suggest function-call-style casting rather than C-style casting. String(yyvalue.string).utf8().data().
Note You need to log in before you can comment on or make changes to this bug.