This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 200569 - Lexing of 'u' + ' ' characaters sequence produces error token instead of IDENT+WS tokens
Summary: Lexing of 'u' + ' ' characaters sequence produces error token instead of IDEN...
Status: RESOLVED FIXED
Alias: None
Product: web
Classification: Unclassified
Component: CSS Visual Tools (show other bugs)
Version: -S1S-
Hardware: PC Mac OS X
: P2 normal (vote)
Assignee: Marek Fukala
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-01 12:26 UTC by Marek Fukala
Modified: 2011-08-02 13:42 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marek Fukala 2011-08-01 12:26:02 UTC
Usecase:

following css code is incorrectly lexed:

.u { }

An error token is created for 'u ' characters instead of two separate tokens IDENT+WS.

This happens due to some issue in the ANTLRs lexer's DFA prediction table which for the mentioned char sequence predicts the URI token will be created. This is incorrect leads to the error token creation. The same problem happens for 'ur ' sequence. Normally the DFA should predict the IDENT token.

I cannot figure out simply why this happens so I'm filling this issue and will work on it. 

The issue has been found during evaluation of the following test failure:

org.netbeans.modules.css.editor.indent.CssIndenterTest.testFormattingNetBeansCSS 


I've create a new unit test NbCss3LexerTest.testLexingOfUPlusWSChar() which simulates the issue.
Comment 1 Marek Fukala 2011-08-01 13:24:53 UTC
fixed in web-main#7beea9ef8e0f
Comment 2 Quality Engineering 2011-08-02 13:42:57 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/7beea9ef8e0f
User: Marek Fukala <mfukala@netbeans.org>
Log: #200569 - Lexing of 'u' + ' ' characaters sequence produces error token instead of IDENT+WS tokens