|
EControl Ltd. VCL libraries and software support forum
|
View previous topic :: View next topic |
Author |
Message |
mstaszew
Joined: 21 Jul 2006 Posts: 67 Location: North Carolina, USA
|
Posted: Wed Aug 30, 2006 7:55 pm Post subject: A few questions about lexers |
|
|
Ok, so after 15 hours of trial and error and countless cups of coffee, I think that I have an understanding of most of the lexer settings. There are 3 however that I am still clueless on. Two of them are not in the help and the other is in the help, but I can't see any visible change occurring in the editor when I change the value. Can anyone please be so kind as to explain in detail the following and f you can provide an example that I can use to actually see a difference then that would be superb.
From the lexer configuration screen...
1) Rules > Properties > Cancel next rules //Its in the help, but I see no difference in how my source code appears after toggling this for a rule that has both parent blocks and child blocks. I would have expected either the parent or child blocks to not show since rule processing should be cancelled.
2) Rules > Text range > Self closing range //I have no clue
3) Rules > Text range > Initially closed (no end rule) //I have no clue except that when I turned this on for the "package declaration" range start rule (PL/SQL lexer) my package specs are no longer shown as a collapsible range in the editor, but I have no idea why that is.
Thanks in advance. |
|
Back to top |
|
|
econtrol Site Admin
Joined: 09 Jun 2006 Posts: 202
|
Posted: Sun Sep 03, 2006 8:32 am Post subject: |
|
|
[b]Cancel next rules[b]
All block rules are checked for each new parsed token. This flag breaks checking next rules if checking of this rule succeeds. Example of using (function determing in VB):
Code: | 1. end func = "sub,function"
"end" ("Cancel next rules" = True)
2. function = "sub,function" (end rule = "end func") |
In this case rule function will not be checked if before there is token "end" token "function".
[b]Self closing range[b]
When this flag is True rule will close previous text range that was opened by this rule and creates new text range. The most easy example rule "Section begin" in "Ini files" lexer.
[b]Initially closed[b]
When this flag is True this rule will open and close text range at the same time, it does not require "End rule". Example rule "Item begin" in "Ini files" lexer.
Michael. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|