Review Request: kjs: Fix shift/reduce issues in grammar.y + cleanup
Bernd Buschinski
b.buschinski at googlemail.com
Mon Apr 30 20:21:36 BST 2012
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/104798/
-----------------------------------------------------------
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 32dbeae
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/20120430/a3341c92/attachment.htm>
More information about the kde-core-devel
mailing list