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 112988 - Provide a generic "gap" terminal.
Summary: Provide a generic "gap" terminal.
Status: RESOLVED FIXED
Alias: None
Product: obsolete
Classification: Unclassified
Component: languages (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Jan Jancura
URL:
Keywords:
Depends on:
Blocks: 111546
  Show dependency tree
 
Reported: 2007-08-16 13:21 UTC by Marek Fukala
Modified: 2007-10-10 17:16 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 2007-08-16 13:21:36 UTC
There might be a situation when a language's token sequence is divided to several pieces by tokens of higher level
language. For an example see issue #111546. 

The CSS code embedded in HTML which is embedded in JSP might contain some jsp tokens in basically two ways:
1) the embedded tokens replaces/generates a part of the css code ( h1 { color: ${"red"}; } )
2) the embedded tokens DOESN't replace/generate part of the css code ( h1 { color: red; ${"   "} } )

case #2 can work even without 'fix' of this issue, however case #1 cannot AFAIK solved in a generic way. In such case we
need to adjust particuallar rules in the grammar to be able to properly reflect the embedded tokens. 

With the gap terminal we can for example modify the grammar rule for css rule item following way:

RULE_ITEM -> NAME : (VALUE | gap) ;

so if user types:

<style>
 h1 { color: ${"red"}; }
</style>

the grammar is able to parse and the features will work, at least I think ;-)
Comment 1 Jan Jancura 2007-08-22 14:48:13 UTC
I will look at it.
Comment 2 Jan Jancura 2007-10-10 17:16:41 UTC
fixed in trunk:
IDE:-------------------------------------------------
IDE: [10/10/07 6:16 PM] Committing "src" started
Checking in Language.java;
/cvs/languages/engine/src/org/netbeans/modules/languages/Language.java,v  <--  Language.java
new revision: 1.53; previous revision: 1.52
done
Checking in parser/LLSyntaxAnalyser.java;
/cvs/languages/engine/src/org/netbeans/modules/languages/parser/LLSyntaxAnalyser.java,v  <--  LLSyntaxAnalyser.java
new revision: 1.47; previous revision: 1.46
done
IDE: [10/10/07 6:16 PM] Committing "src" finished