Review Request: Avoid endless loop in LA()

Jonathan Schmidt-Dominé devel at the-user.org
Mon Oct 29 15:55:59 UTC 2012


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/107071/#review21094
-----------------------------------------------------------


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

- Jonathan Schmidt-Dominé


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
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20121029/ce6f118f/attachment.html>


More information about the KDevelop-devel mailing list