News:

PROTON pic BASIC Compilers for PIC, PIC24, dsPIC33

Main Menu

Technilcal view: editing highlighter

Started by keytapper, Mar 27, 2022, 06:48 AM

Previous topic - Next topic

keytapper

Hello forum,
certain time I spend a little to improve my favorite editor Kate. The highlight is a matter to edit an XML file, which contains several definition. As previously posted that file definition, the result should be pretty usable.
Lately I discover an annoying effect, the labels definition.
As few of members here, we should know how to deal with regex and mine is
"^(_*[A-Za-z0-9])+?\:\s+"Explaining a bit the meaning:

From the start of one line, if not then it will be rejected
Any number of underscore _
One or more characters on the range of A-Z and a-z including digits, as well
One or more times repeatable the above group (enclosed by the round parenthesis)
Followed by a colon and one or more spaces


But the result is ignoring where is the position of the colon (ASCII equal to 58), then Kate will set the defined color for the entire line that contains a colon anywhere.

So, my concern is about the correctness of the parsing, which means whether the compiler is accepting such label type.
Later I'll try to find where is the faulty statement for highlighting labels.
Ignorance comes with a cost