Difference between revisions of "Prokee Module: bbs"
Jump to navigation
Jump to search
| Line 13: | Line 13: | ||
* <code>$esc</code><br>One or more characters, which mark an escape-sequence. The next following character is treated with regard to the value of <code>$escmode</code>. | * <code>$esc</code><br>One or more characters, which mark an escape-sequence. The next following character is treated with regard to the value of <code>$escmode</code>. | ||
* <code>$escmode</code><br>Escape-modue.<br>Possible values are: <code>default</code>. | * <code>$escmode</code><br>Escape-modue.<br>Possible values are: <code>default</code>. | ||
| − | * <code>$id</code><br>The id of the type of the block. ( | + | * <code>$id</code><br>The id of the type of the block. (an integral value greater than 0) |
* <code>$nesting</code><br>Specifies, if blocks may be nested or not.<br>Possible values are: <code>true</code>, <code>false</code>. | * <code>$nesting</code><br>Specifies, if blocks may be nested or not.<br>Possible values are: <code>true</code>, <code>false</code>. | ||
* <code>$skip</code><br>Specifies, if blocks should be skipped.<br>Possible values are: <code>true</code>, <code>false</code>. | * <code>$skip</code><br>Specifies, if blocks should be skipped.<br>Possible values are: <code>true</code>, <code>false</code>. | ||
Revision as of 10:00, 12 May 2019
The module bbs implements a scanner, which detects blocks of code like comments and string literals.
Examples of Blocks
- line comments
- block comments
- string literals
- block strings
Options
$begin
Sequence of characters, which mark the beginning of the block.$end
Sequence of characters, which mark the end of the block.$end2
Extra optional character for the end of block strings.$esc
One or more characters, which mark an escape-sequence. The next following character is treated with regard to the value of$escmode.$escmode
Escape-modue.
Possible values are:default.$id
The id of the type of the block. (an integral value greater than 0)$nesting
Specifies, if blocks may be nested or not.
Possible values are:true,false.$skip
Specifies, if blocks should be skipped.
Possible values are:true,false.$nl
Specifies how to treat EOL characters at the end of the block.
Possible values are:defaultBlockComment,defaultLineComment,default.$indent
Specifies how indentation of block strings should be handled.
Possible values are:bsmode,false.
Example
The example below defines block comments of the form /*...*/.
DEF BlockComment:BLOCKRULE
{
$id="123";
$begin="/*";
$end="*/";
$esc="\\";
$escmode="default";
$nesting="false";
$skip="true";
$nl="defaultBlockComment";
$indent="false";
}