Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 311245

Summary: [LRParser] Parser completion gets confused by newline?
Product: [Tools] CDT Reporter: Charley Wang <charley.wang>
Component: cdt-parserAssignee: Project Inbox <cdt-parser-inbox>
Status: RESOLVED WORKSFORME QA Contact: Mike Kucera <mikekucera>
Severity: minor    
Priority: P3 CC: jamesblackburn+eclipse
Version: 7.0   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
Sample patch none

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/