[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Need Help for Syntax HighLighting


Excuse my English, I mean curly brackets

Regards
Gianluigi

Il 28/08/24 17:06, Gianluigi ha scritto:
Hi Olivier,

it works well :-) , but what if I wanted to make them bold?
See attached project

Thanks and regards
Gianluigi

Il 28/08/24 16:50, Linus ha scritto:
Hello,

Not the best solution but could be a start point.
The RegExp into the MATCH line need to be tweaked to your need


$(IDENT)=[a-zA-Z0-9-:_()∈ℕ]+

comment{Normal}:
   from { to }
   value{Comment}:
     match /$(IDENT)/


Olivier Cruilles


Le 28 août 2024 à 03:44, Hans Lehmann <hans@xxxxxxxxxxxxxx
<mailto:hans@xxxxxxxxxxxxxx>> a écrit :


Hello,

I am looking for a string- or RegExp-pattern allowing to highlight the
comments in the proprietary language LIPA. The comments in LIPA are
enclosed in curly brackets. Here an example for a command line:

INP(16);    { First summand (s1 ∈ ℕ) is entered » stack_1 }

My aim is to highlight the text between the curly brackets - which
means without the brackets.

I tried:

Comment:
  from { to }     <---- that works, but includes the brackets
  between { and } <---- that doesn't work at all

and tested regular LookAhead and LookBehind expressions like

  match /(?<=\{).*(?=\})/

but they didn't work as well although they work with the Gambas
RegExp-class.

Can anyone help?

With kind regards

Hans



References:
Need Help for Syntax HighLightingHans Lehmann <hans@xxxxxxxxxxxxxx>
Re: Need Help for Syntax HighLightingLinus <olivier.cruilles@xxxxxxxx>
Re: Need Help for Syntax HighLightingGianluigi <gradobag@xxxxxxxxxxx>