[ jedit-Bugs-1569735 ] IMPORTS in IMPORTS fail to get resolved partly (hash-issue?)

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
Report Content as Inappropriate

[ jedit-Bugs-1569735 ] IMPORTS in IMPORTS fail to get resolved partly (hash-issue?)

Bugs item #1569735, was opened at 2006-10-03 07:59
Message generated for change (Comment added) made by vampire0
You can respond by visiting:

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: text area and syntax packages
Group: normal bug
>Status: Closed
>Resolution: Fixed
Priority: 5
Private: No
Submitted By: daniel hahler (blueyed)
>Assigned to: Björn Kautler (vampire0)
Summary: IMPORTS in IMPORTS fail to get resolved partly (hash-issue?)

Initial Comment:
Consider this test_syntax.xml mode file:
<?xml version="1.0"?>

<!DOCTYPE MODE SYSTEM "xmode.dtd">

                <SEQ TYPE="KEYWORD1">one</SEQ>
                <IMPORT DELEGATE="DELEGATE_1" />

        <RULES SET="DELEGATE_1">
                <SEQ TYPE="KEYWORD2">2two</SEQ>
                <IMPORT DELEGATE="DELEGATE_2" />

        <RULES SET="DELEGATE_2">
                <SEQ TYPE="KEYWORD4">three</SEQ>
                <SEQ TYPE="KEYWORD4">3three</SEQ>


And this file handled by it:
// Test jEdit syntax modes


The problem is, that "three" and "3three" do not get
highlighted/recognized, unless you add a rule into
the DELEGATE_1 set starting with the same
char/number, e.g. changing "2two" to "32two" would
highlight "3three" from DELEGATE_2..!

I've tried to call ParserRuleSet::resolveImports()
recursively at the beginning for the rulesets it
processes, but this can cause infinite loops.

If IMPORTS of "infinite" depth wouldn't be supported,
that would make sense, but only rules with already
existing hash/index chars get applied seems to be a
bug somewhere.

((( Use case: I want to use this for the php.xml mode
file, so that I import a list of regular expressions
for function definitions into a rule set, where the
regular KEYWORDs are defined, so that the keywords
get highlighted as supposed, but the regular
expressions (one for each hash char) are recognized
also, not overriding the highlighting of the


>Comment By: Björn Kautler (vampire0)
Date: 2006-11-13 21:44

Logged In: YES

fixed in SVN rev. 8026 will be in 4.3pre9


Comment By: daniel hahler (blueyed)
Date: 2006-10-07 16:30

Logged In: YES

A patch to fix this is here:

I don't seem to have SVN write access (at least the last
time I've tried to correct a typo), so someone should review
and apply the patch.


You can respond by visiting:

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
jEdit Developers' List
[hidden email]