My FoxPro syntax file works pretty well <g> with the following problem.
FoxPro functions will not highlight properly unless there is a space between the function name and the first parenthesis of the argument.
Curiously, if a square bracket is used to surround the arguments, it highlights correctly... no space required. FoxPro actually allows the use of square brackets in this way but it is not usual practice.
While the function name does not highlight correctly, the parentheses do highlight correctly, so it appears TextPad recognizes them, but does not recognize that a keyword has ended when it sees the opening (.
I also need to maintain () as brackets as in FoxPro a variable name surrounded by parentheses is a valid expression.
Highlighting: KEYWORDS vs FUNCTIONS
Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard
Highlighting: KEYWORDS vs FUNCTIONS
ProMatrix MVP - Life
Characters that can be a part of keywords are all letters, plus any others that are included in any of the list of keyword characters. When looking for keywords, TextPad gathers together all consecutive groups of characters that could be part of a keyword, then looks the result up in the keyword tables. This is why "(" is being included with function names, causing the lookup to fail. I guess FoxPro is a language that needs to be treated as a special case.
Keith MacDonald
Helios Software Solutions
Keith MacDonald
Helios Software Solutions
Thanks Keith...
I have not included any parentheses in the function names as listed in the keyword lists. They are only in the BracketChars key of the [Syntax] section of the .syn file. As brackets, they always highlight correctly even in function call. This is desireable. They are not included in the KeyWordChars key. (Is KeyWordChars still supported? I don't see it in the help file.)
If I remove them from the BracketChars key, it does not solve the problem.
I opened some C programs, whcih uses the supplied CPP.SYN file and that seems to work for parentheses and functions. Don't see why there should be a difference. I'll play with my syntax file some more...
[/img]
I have not included any parentheses in the function names as listed in the keyword lists. They are only in the BracketChars key of the [Syntax] section of the .syn file. As brackets, they always highlight correctly even in function call. This is desireable. They are not included in the KeyWordChars key. (Is KeyWordChars still supported? I don't see it in the help file.)
If I remove them from the BracketChars key, it does not solve the problem.
I opened some C programs, whcih uses the supplied CPP.SYN file and that seems to work for parentheses and functions. Don't see why there should be a difference. I'll play with my syntax file some more...
[/img]
ProMatrix MVP - Life
Found the problem...
I had a keyword section for system function calls that included parentheses, e.g.
SYS(1)
SYS(2)
...
Don't know why this would affect other function names. Confused TexPad anyway <vbg>...
I added SYS to a new Keyword section to get specific colors. I'll also update the VFP syntax file on the TextPad site...
I had a keyword section for system function calls that included parentheses, e.g.
SYS(1)
SYS(2)
...
Don't know why this would affect other function names. Confused TexPad anyway <vbg>...
I added SYS to a new Keyword section to get specific colors. I'll also update the VFP syntax file on the TextPad site...
ProMatrix MVP - Life
-
- Posts: 1
- Joined: Mon Oct 16, 2006 7:09 pm
Found the same problem with SPSS syntax. The following keywords had parentheses included and consequently no functions followed by ")" would highlight:
;TEST(ESTIMABLE)
;TEST(LMATRIX)
;TEST(MMATRIX)
;TEST(SSCP)
;TEST(TRANSFORM)
Once these were deactivated with preceding ";" highlighting works like magic.
How do I change the SPSS.syn file in the downloads section of this website?
;TEST(ESTIMABLE)
;TEST(LMATRIX)
;TEST(MMATRIX)
;TEST(SSCP)
;TEST(TRANSFORM)
Once these were deactivated with preceding ";" highlighting works like magic.
How do I change the SPSS.syn file in the downloads section of this website?
- Bob Hansen
- Posts: 1516
- Joined: Sun Mar 02, 2003 8:15 pm
- Location: Salem, NH
- Contact: