Review Request: Avoid endless loop in LA()

Milian Wolff mail at milianw.de
Wed Oct 31 10:53:38 UTC 2012


On Monday 29 October 2012 17:11:45 Jonathan Schmidt-Dominé wrote:
> > On Oct. 29, 2012, 3:56 p.m., Jonathan Schmidt-Dominé wrote:
> > > Hi Niko,
> > > 
> > > the suggested fix seems to be incorrect. This is what the code should
> > > do:
> > > * While there are less than position+k+1 tokens in the stream
> > > ** generate missing tokens (for example by using a lexer or by adding
> > > EOFs if you are at the end) * Return the token at position+k
> > > Instead, the default implementation of kdev-pg-token-stream.h should be
> > > fixed: It should generate EOFs if there are no more tokens in the
> > > stream. I will test that.
> > > 
> > > Regards
> 
> Fixed:
> http://commits.kde.org/kdevelop-pg-qt/a3e6e709ea23e5ce1ab1c9749695ac0d0a496
> a58

Please add a unit test, that ensures this works properly.

Cheers

PS: Once thats done, and Niko confirmed that it works for CSS as advertised, 
then I we need to create a new KDevelop-PG-Qt release. Jonathan, where do you 
configure the version? I see two version strings in cmake/modules/KDevelop-PG-
QtConfig{,Version}.cmake - which one must be set?

> On Oct. 27, 2012, 1:34 p.m., Niko Sams wrote:
> > -----------------------------------------------------------
> > This is an automatically generated e-mail. To reply, visit:
> > http://git.reviewboard.kde.org/r/107071/
> > -----------------------------------------------------------
> > 
> > (Updated Oct. 27, 2012, 1:34 p.m.)
> > 
> > 
> > Review request for KDevelop and Jonathan Schmidt-Dominé.
> > 
> > 
> > Description
> > -------
> > 
> > I found an issue with the LA method generated by kdevelop-pg-qt, this
> > patch fixes it.
> > 
> > If the patch gets accepted we should release a new version of
> > kdevelop-pg-qt.
> > 
> > 
> > Diffs
> > -----
> > 
> >   kdev-pg/kdev-pg-code-gen.cpp e06c6be
> > 
> > Diff: http://git.reviewboard.kde.org/r/107071/diff/
> > 
> > 
> > Testing
> > -------
> > 
> > unittest in kdev-css shows the issue:
> > ./parser/parsertest "parser:missing closing brace"
> > 
> > 
> > Thanks,
> > 
> > Niko Sams
-- 
Milian Wolff
mail at milianw.de
http://milianw.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20121031/65153b65/attachment.sig>


More information about the KDevelop-devel mailing list