Review Request 104798: kjs: Fix shift/reduce issues in grammar.y + cleanup
Commit Hook
null at kde.org
Sat Mar 30 15:14:23 GMT 2013
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/104798/
-----------------------------------------------------------
(Updated March 30, 2013, 3:14 p.m.)
Status
------
This change has been marked as submitted.
Review request for kdelibs.
Description
-------
kjs: Fix shift/reduce issues in grammar.y + cleanup
The IterationStatement caused 1 shift/reduce conflict.
This is because of those 2 lines
DO Statement WHILE '(' Expr ')' ';' { $$ = new DoWhileNode($2, $5); DBG($$, @1, @3);}
DO Statement WHILE '(' Expr ')' { $$ = new DoWhileNode($2, $5); DBG($$, @1, @3); }
they only differ in ';', which bison/grammar.y has as default. So these 2 lines are basically the same
for bison, and it does not know know which one to pick. The Solution is easy, just removing
the ';' line will fix it.
The other changes fix bison warnings like
grammar.y:257.67: warning: a `;' might be needed at the end of action code
grammar.y:257.67: warning: future versions of Bison will not add the `;'
adding a simple ; is a simple fix and doesn't hurt
Diffs
-----
kjs/grammar.cpp 71245a4
kjs/grammar.y d5e835f
Diff: http://git.reviewboard.kde.org/r/104798/diff/
Testing
-------
run ecmascript with and without this patch, same result, so it shouldn't introduce a regression.
Thanks,
Bernd Buschinski
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20130330/3c55da5d/attachment.htm>
More information about the kde-core-devel
mailing list