Bug 140513 - Bash parser does not recognize two parenthesis not closed together
Summary: Bash parser does not recognize two parenthesis not closed together
Status: RESOLVED INTENTIONAL
Alias: None
Product: kate
Classification: Applications
Component: syntax (show other bugs)
Version: 2.5
Platform: unspecified Linux
: NOR wishlist
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-01-23 21:49 UTC by Luiz Angelo De Luca
Modified: 2015-10-08 09:00 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Luiz Angelo De Luca 2007-01-23 21:49:43 UTC
Version:           3.3.5 (using KDE 3.5.5 "release 45.2" , openSUSE 10.2)
Compiler:          Target: x86_64-suse-linux
OS:                Linux (x86_64) release 2.6.18.2-34-default

In this code:

function aaa {
    (( echo 123 ) | echo 1 )   
}

XXXX

The parses doesn't undestand (( as two symbols so it never close the clausure.
Comment 1 Andreas Pakulat 2007-01-23 22:20:41 UTC
I can confirm this, but syntax highlighting is done by kate. Reassigning.
Comment 2 steveL 2007-04-09 19:11:22 UTC
This is tricky with the current .xml file as it assumes (( is arithmetic expansion. The kludge is to put a space in whenever you don't mean that.
A more complete solution would require some sort of backtracking on encountering a ).
Comment 3 Pino Toscano 2007-07-31 00:44:26 UTC
(Really reassing to the Kate guys.)
Comment 4 Dario Andres 2009-01-04 22:25:59 UTC
Still valid here using:

Qt: 4.4.3 + qt-copy-patches-889120
KDE: 4.1.87 (KDE 4.1.87 (KDE 4.2 >= 20090101))
kdelibs svn rev. 905636 / kdebase svn rev. 905636
kdesdk svn rev. 905676
on ArchLinux x86_64 - Kernel 2.6.27.10
Comment 5 Dario Andres 2009-01-04 22:27:09 UTC
Can this be related to bug 140514 ?
Comment 6 Luiz Angelo De Luca 2009-05-20 21:57:59 UTC
This bug is still present in kde 4.3. 


function aaa {
    (( echo 123 ) | echo 1 )   
}

function bbb {
    (( echo 123 ) | echo 1 )   
}

test


Yes Dario, this might be related but, to make it sure, I think it's better to let this in different bug reports until it is fixed.
Comment 7 Christoph Cullmann 2010-02-20 14:55:56 UTC
Moving to wish list status. All highlightings works with heuristics and will never be perfect. Perhaps somebody can provide a patch, therefor not closing it.
Comment 8 Luiz Angelo De Luca 2012-04-10 14:45:54 UTC
Still present in kde 4.8
Comment 9 Luiz Angelo De Luca 2012-04-13 01:19:09 UTC
Bash do some nasty parsing in order to differ (( )) from (( ) ). This is not treated by its defined grammar.

I guess kate parsing process need to be improved in order to allow a viable way to interpret this code (https://bugs.kde.org/show_bug.cgi?id=140514#c7)
Comment 10 Christoph Cullmann 2015-10-08 09:00:52 UTC
Dear user,

this wish list item is now closed, as it wasn't touched in the last two years and no contributor stepped up to implement it.

The Kate/KTextEditor team is very small and we can just try to keep up with fixing bugs. Therefore wishs that show no activity for two years or more will be closed from now on to keep at least a bit overview about 'current' wishs of the users.

If you want your feature to be implemented, please step up to provide some patch for it. If you think it is really needed, you can reopen your request, but keep in mind, if no new good arguments are made and no people get attracted to help out to implement it, it will expire in two years again.

We have a nice website kate-editor.org that provides all the information needed to contribute, please make use of it. For highlighting improvements our user manual shows how to write syntax definition files.

Greetings
Christoph