Difference between revisions of "Prokee Module: bbs"
Jump to navigation
Jump to search
(Created page with "The module '''bbs''' implements a scanner, which detects blocks of code like comments and string literals. === Examples of Blocks === * line comments * block comments * strin...") |
m (Text replacement - "http://www.andreaspollhammer.com/downloads/docu/html/" to "http://www.andreaspollhammer.com/lab/downloads/docu/html/") |
||
| (3 intermediate revisions by the same user not shown) | |||
| 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>. | ||
| Line 33: | Line 33: | ||
$indent="false"; | $indent="false"; | ||
} | } | ||
| + | |||
| + | == Implementations == | ||
| + | * [http://www.andreaspollhammer.com/lab/downloads/docu/html/bbs_v01.php bbs (version v01)] | ||
[[Category:Prokee Modules]] | [[Category:Prokee Modules]] | ||
[[Category:Scanner]] | [[Category:Scanner]] | ||
Latest revision as of 12:58, 1 June 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";
}