Page 1 of 1
Lexer rules wil multiple conditions
Posted: 12.09.2017 11:03
by iferius
How do lexer rules with multiple condition indexes work?
Posted: 12.09.2017 11:15
by Alexey
can you give more details (what is mul conditions?).
Posted: 14.09.2017 13:00
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?
Posted: 14.09.2017 13:43
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
Posted: 14.09.2017 13:44
by Alexey
Mask - you can write reg-ex as value.
Skip token - token will be skipped by lexer parser (not included in result)