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 118748 - Allow Schlieman lexer to lex over a GAP
Summary: Allow Schlieman lexer to lex over a GAP
Status: RESOLVED FIXED
Alias: None
Product: obsolete
Classification: Unclassified
Component: languages (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Jan Jancura
URL:
Keywords:
: 118914 (view as bug list)
Depends on:
Blocks: 111546 117802
  Show dependency tree
 
Reported: 2007-10-12 18:04 UTC by Marek Fukala
Modified: 2007-11-02 11:37 UTC (History)
3 users (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 2007-10-12 18:04:46 UTC
Currently there is a big problem that Schlieman lexer cannot lex tokens over a higher level embedding language properly.

For example such JSP file

<script>
  var x = "${"ahoj"}";
</script>

causes the JS lexer to create error tokens on the boundaries with the expression language.

According to what I have been told formerly, S. lexer needs to look behind the "gap" to be able to properly determine
the type of token. However current lexer architecture doesn't allow this, the input characters stream provided to the
lexer implementation ends at the end of the section so the lexer cannot properly look ahead. There is a lexer issue
filed for this problem - #117450 (Provide unified LexerInput across multiple joined embedded sections).

Since it doesn't look like #117450 can be fully fixed in 6.0, we may need to use some workaround solution. Preprocessing
the document - extracting the language pieces, putting them into a character stream and lexing separatedly and them
translating the artificial offsets to the real ones seems to be a doable solution. 

Any opinions? Idea?

For completeness, without fixing this problem we won't be likely able to fully fix #111546, #117802.
Comment 1 Jan Jancura 2007-10-15 10:54:03 UTC
RFE? P3?
Comment 2 Marek Fukala 2007-10-15 11:18:43 UTC
Blocks P2s ...
Comment 3 Marek Fukala 2007-10-18 14:30:39 UTC
*** Issue 118914 has been marked as a duplicate of this issue. ***
Comment 4 Jan Jancura 2007-11-02 11:37:16 UTC
fixed.