Lexer rules wil multiple conditions

All questions regarding lexer highlighting schemes are discussed here...
Post Reply
iferius
Posts: 12
Joined: 30.06.2017 08:57

Lexer rules wil multiple conditions

Post by iferius »

How do lexer rules with multiple condition indexes work?
Alexey
Posts: 1633
Joined: 05.10.2012 22:10

Post by Alexey »

can you give more details (what is mul conditions?).
iferius
Posts: 12
Joined: 30.06.2017 08:57

Post by iferius »

... For some reason my reply wan't posted. Let's try that again.

Okay, so when I create a lexer rule, I can add conditions on the last tab (conveniently called "conditions"). Now I've had single conditions work just fine, but if I want to have two consecutive conditions (index 0: be of the token type Action; index 1: be of the token type Actionvalue with the value "Start") I can't figure out how to make that work. Could you help me with that?

Also, I've only used Equal and Not equal. What do Mask and Skip tokens do?
Alexey
Posts: 1633
Joined: 05.10.2012 22:10

Post by Alexey »

condition with 2+ items must work OK. try see lexer Pascal:
rules - conditions - rule "records" - 4 conditions here.
also see Readme folder in CudaText/Synwrite - Tutorial files
Alexey
Posts: 1633
Joined: 05.10.2012 22:10

Post by Alexey »

Mask - you can write reg-ex as value.
Skip token - token will be skipped by lexer parser (not included in result)
Post Reply