Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 311245 - [LRParser] Parser completion gets confused by newline?
Summary: [LRParser] Parser completion gets confused by newline?
Status: RESOLVED WORKSFORME
Alias: None
Product: CDT
Classification: Tools
Component: cdt-parser (show other bugs)
Version: 7.0   Edit
Hardware: PC Linux
: P3 minor (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Mike Kucera CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-04-30 17:31 EDT by Charley Wang CLA
Modified: 2011-01-22 06:43 EST (History)
1 user (show)

See Also:


Attachments
Sample patch (1.20 KB, text/plain)
2010-04-30 17:32 EDT, Charley Wang CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Charley Wang CLA 2010-04-30 17:31:23 EDT
I spent some time looking into the 5 test failures in LRCompletionBasicTests reported by Hudson.

I looked for the source of the problem in the LRParser, and noticed that when using the LRParser, the CDT's Lexer class didn't hit an END_OF_INPUT when it was supposed to. 

Looks like stripping the trailing "\n" from the code is fixes 3 of the 5 test failures. This may be symptomatic of a bug in the LRParser itself, but I was unable to find this bug.

The attached patch is a quick fix that demonstrates what I mean re: stripping the trailing "\n" to get rid of test failures.

-Charley
Comment 1 Charley Wang CLA 2010-04-30 17:32:14 EDT
Created attachment 166692 [details]
Sample patch

Patch demonstrates a way to cover the test failures, but does not address any potential underlying bug in LRParser.
Comment 2 James Blackburn CLA 2011-01-22 06:43:37 EST
These tests are no longer failing, though there are a bunch of lrparser
failures:
https://hudson.eclipse.org/hudson/job/cdt-nightly/lastCompletedBuild/testReport/