I'm trying to figure this out and it isn't easy. So before I resubmit this as a bug or a suggestion, I wanted to see if I could understand this. The problem is this:
It appears as though there are three flavors of regex here, and none of them place nice with the other. The regex displayed in the Lexar Editor doesn't match up with the regex being used to display the code in Cudatext, and then there is the regex in Search and Replace. Why isn't there just one regex? Because I can't get any of the regex results in Cudatext to match up, I can't tell what the rules are for getting certain keywords to highlight. All the other parser categories work, so why not these ones?
For an example of what I am talking about, look at the inline pic. The regex shows hint.branch underlined, but not #undef or getsec[wakeup] (all Intel ASM instructions or GoAsm directives). I am testing my regex using a website as shown, just to see if it would work at least somewhere in the Universe, and it does. So what "regex" am I supposed to use to get #undef, getsec[wakeup], and hint.branch to highlight in Cudatext? I don't care if it never works for the example code in the Lexar Editor (not important), or if it doesn't match what it required for the Search and Replace function (I never get that complicated with searches).
3 regex flavours in program?
We have 2 flavors:
- EControl regex used in lexer parsing
- Lazarus regex used in search/repl
SynWrite lexer editor has EControl flavor with little changes.
We cannot use one, because to use Lazarus regex, ECtl needs some rewrites and testing, and ECtl has /lookahead assertion for variable length/ - Lazarus dont have it.
- EControl regex used in lexer parsing
- Lazarus regex used in search/repl
SynWrite lexer editor has EControl flavor with little changes.
We cannot use one, because to use Lazarus regex, ECtl needs some rewrites and testing, and ECtl has /lookahead assertion for variable length/ - Lazarus dont have it.
>So what "regex" am I supposed to use to get #undef, getsec[wakeup], and hint.branch to highlight in Cudatext?
Dont use \S because EControl regex has issues in it
And move this regex rule UPPER in the list
Code: Select all
[\#\w\[\]\.]+
And move this regex rule UPPER in the list