I am trying to create a lexer for Total Commander menu files. I have succeeded in creating everything that I wanted except the ability to fold between POPUP
and END_POPUP. I have read your tutorials and attempted many variations. I also tried starting with the Autoit lexer and retrofitting it with my lexer. Still
not able to get it to work.
I have attached the lexer I created - without the Blockrules section. Can you give me a some additional help?
Joe
---------
From moderator:
Updated lexer is here: https://github.com/Alexey-T/CudaText-le ... Cmd%20menu
Lexer "Total Commander menu" (was: Help with lexer)
Lexer "Total Commander menu" (was: Help with lexer)
- Attachments
-
- TCMenu.lcf.txt
- (5.1 KiB) Downloaded 232 times
-
- Posts: 2245
- Joined: 25.08.2021 18:15
-
- Posts: 2245
- Joined: 25.08.2021 18:15
errors in your lexer file
1. missing block-rules of course
2. 'token type' fields of Parser rules was not set OK (main error! it prevented to config block-rules, which need 'token type')
3. instead of parser 'popup|end_popup' you must write '\b(popup|end_popup)\b'
3b. the same as 3 for other word-finding parsers
4. 'comment' parser: must support spaces: '^\x20*;.*' -- but to find leading spaces, you must toggle the lexer property "skip leading spaces" (I write by memory, it is checkbox in SynWrite)
5. 'number' parser: need '\d+\b'
lexer is updated. it has folding now.
1. missing block-rules of course
2. 'token type' fields of Parser rules was not set OK (main error! it prevented to config block-rules, which need 'token type')
3. instead of parser 'popup|end_popup' you must write '\b(popup|end_popup)\b'
3b. the same as 3 for other word-finding parsers
4. 'comment' parser: must support spaces: '^\x20*;.*' -- but to find leading spaces, you must toggle the lexer property "skip leading spaces" (I write by memory, it is checkbox in SynWrite)
5. 'number' parser: need '\d+\b'
lexer is updated. it has folding now.
- Attachments
-
- TCMenu.lcf.txt
- (6.08 KiB) Downloaded 229 times
-
- Posts: 2245
- Joined: 25.08.2021 18:15
Posted copy of lexer to https://github.com/Alexey-T/CudaText-lexers