[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kwrite-devel
Subject:    Re: Debugging syntax Highlighting
From:       "=?ISO-8859-15?Q?Stefan_/*St0fF*/_H=FCbner?=" <st0ff.npl () googlemail ! com>
Date:       2013-06-18 18:45:30
Message-ID: 51C0AACA.1030203 () gmail ! com
[Download RAW message or body]

@Torsten: yep, I found that out, also.  And 4DOS is a very special shell
language, on one hand having tons of great features, on the other hand
trying to stay as compatible as possible with standard M$ command.com.

That also is the reason for doing do, iff switch, input/inkey in their
own context-set: they all work a bit differently.  Comparing to "for"
and "if" (the compatibility-functionality) they have way too many
options.  And I'd like to have at least a first simple syntax-checking
within the highlighting, just because it's so complicated.

And yes, I keep the bash.xml open ;)

@Dominik: thank you for the explanation of the dynamic feature.

About the lookahead: the way you explain it is how I understood it
should work.  But somehow it didn't (might have been my fault, tho), so
I tried around with look-around RegEx.  I found out that QT-Regexp do
not support look-around, only look-ahead - so I figured it's gonna be
the same with KDE-stuff.  I just don't understand some outcomes of what
I do.  Maybe I'll just need to take another approach.

I think what I'll do from here is:
- create another highlighting-file for a "test"-language
- use this file for creating contexts that highlight pieces of what I
need later on in the 4dos highlighting
I think this might be a good approach to not always have to redo stuff
from the start.


Just one last question (for those conditions I'm trying to match).
- the first word of my "condition" may be the optional "not"
- it shall be highlit differently (alert - just to show it's there)
- when another "not" comes up in the rest of the condition (may it be a
piece of a string) it shouldn't be differently lit.
Is my approach to have a first rule only matching "not" and then
switching to the next context regardless of any matches good?

All the best and thank you all for your feedback,
Stefan

Am 18.06.2013 09:43, schrieb Torsten Eichstädt:
> @Stefan, you could put the keywords "do iff switch input inkey" in a
> item list, like you do with "enddo" etc.
> 
>  
> 
> Did you look in the syntax files for shell languages: Bash, and maybe
> there's one for C-Shell, too? They are a good start. Beware that Shell
> languages are pretty complicated, IMHO...
> 
> -- 
> 
> =|o)
> 
> 
> 
> _______________________________________________
> KWrite-Devel mailing list
> KWrite-Devel@kde.org
> https://mail.kde.org/mailman/listinfo/kwrite-devel
> 

_______________________________________________
KWrite-Devel mailing list
KWrite-Devel@kde.org
https://mail.kde.org/mailman/listinfo/kwrite-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic