[ 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
|

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

SourceForge.net
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:
https://sourceforge.net/tracker/?func=detail&atid=100588&aid=1569735&group_id=588

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">

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

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

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

</MODE>
"""

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

one
two2two
3three
"""

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
KEYWORDs.)))

----------------------------------------------------------------------

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

Message:
Logged In: YES
user_id=918212

fixed in SVN rev. 8026 will be in 4.3pre9

----------------------------------------------------------------------

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

Message:
Logged In: YES
user_id=663176

A patch to fix this is here:
http://sourceforge.net/tracker/index.php?func=detail&aid=1572746&group_id=588&atid=300588

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:
https://sourceforge.net/tracker/?func=detail&atid=100588&aid=1569735&group_id=588

-------------------------------------------------------------------------
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
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
--
-----------------------------------------------
jEdit Developers' List
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jedit-devel