I am having a problem getting TextPad to recognize keywords when they are strung together with a delimeter.
For example, the floowing line would only highlight the word "WAIT" as a keyword. It misses "ERROR" and "TEXT_ONLY" because of the "/".
ERROR/TEXT_ONLY/WAIT
If I put ERROR/TEXT_ONLY (leaving off the last qualifier) then "TEXT_ONLY" is highlighted as a key word but not "ERROR". If I leave off all qualifiers, "ERROR" is then highlighted.
Is there any way to get TextPad to recognize all the key words when they are separated by a qualifier ("/").
Thanks,
Phillip
Problem with keywords strung together
Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard
-
Murray
Re: Problem with keywords strung together
Phillip
I'm not sure if I have understood this correctly, but when I tried this it worked OK. Perhaps the problem is in your syntax file? Try the one below. When I try your example with the syntax file as below, each word is highlighted and the "/"s aren't.
Hope this helps
Regards
Murray
; TextPad syntax definition testing file
;
C=1
[Syntax]
Namespace1 = 6
IgnoreCase = Yes
KeyWordLength = 0
BracketChars = {[()]}
OperatorChars =
PreprocStart =
SyntaxStart =
SyntaxEnd =
HexPrefix =
CommentStart =
CommentEnd =
CommentStartAlt =
CommentEndAlt =
SingleComment =
SingleCommentCol =
SingleCommentAlt =
SingleCommentColAlt =
SingleCommentEsc =
StringsSpanLines = No
StringStart =
StringEnd =
StringAlt =
StringEsc =
CharStart =
CharEnd =
CharEsc =
[Keywords 1]
ERROR
TEXT_ONLY
WAIT
[Keywords 2]
[Keywords 3]
I'm not sure if I have understood this correctly, but when I tried this it worked OK. Perhaps the problem is in your syntax file? Try the one below. When I try your example with the syntax file as below, each word is highlighted and the "/"s aren't.
Hope this helps
Regards
Murray
; TextPad syntax definition testing file
;
C=1
[Syntax]
Namespace1 = 6
IgnoreCase = Yes
KeyWordLength = 0
BracketChars = {[()]}
OperatorChars =
PreprocStart =
SyntaxStart =
SyntaxEnd =
HexPrefix =
CommentStart =
CommentEnd =
CommentStartAlt =
CommentEndAlt =
SingleComment =
SingleCommentCol =
SingleCommentAlt =
SingleCommentColAlt =
SingleCommentEsc =
StringsSpanLines = No
StringStart =
StringEnd =
StringAlt =
StringEsc =
CharStart =
CharEnd =
CharEsc =
[Keywords 1]
ERROR
TEXT_ONLY
WAIT
[Keywords 2]
[Keywords 3]
-
Phillip Murphy
Re: Problem with keywords strung together
Murray,
Thank you for your reply.
I tried what you had and it works fine (setup a .tst class). So, I began to make my existing .syn file conform. Guess what? It didn't work. The ONLY thing that was different was that the existing file had more key words.
Okay, I was baffled! Looking through my key words, the only thing that looked different was that I had a keyword with a "/" in it ("EDIT/TABLE"). The "/" in this keyword was affecting any highlighting in the text around a "/" even though the keywords were not even the same.
So, I broke the EDIT/TABLE out into two keywords with no slash and it fixed my ERROR/TEXT_ONLY/WAIT.
I don't get this one, but you giving it a try proved to me that it could be done. Thank you very much for trying it on your system so that I knew it wasn't a limitation of the editor.
Thanks again,
Phillip Murphy
Thank you for your reply.
I tried what you had and it works fine (setup a .tst class). So, I began to make my existing .syn file conform. Guess what? It didn't work. The ONLY thing that was different was that the existing file had more key words.
Okay, I was baffled! Looking through my key words, the only thing that looked different was that I had a keyword with a "/" in it ("EDIT/TABLE"). The "/" in this keyword was affecting any highlighting in the text around a "/" even though the keywords were not even the same.
So, I broke the EDIT/TABLE out into two keywords with no slash and it fixed my ERROR/TEXT_ONLY/WAIT.
I don't get this one, but you giving it a try proved to me that it could be done. Thank you very much for trying it on your system so that I knew it wasn't a limitation of the editor.
Thanks again,
Phillip Murphy
-
Martin
Re: Problem with keywords strung together
Any char found in any keyword is assumed to be a valid char in a keyword (!) and thus doesn't delimit keywords. Or: Don't stick chars that you want to delimit keyword into them.
It's a reasonable assumption and rule I guess=)
It's a reasonable assumption and rule I guess=)