|Top Previous Next|
The project options, which at first are valid for all productions, can be overwritten for single productions. A menu item Local options exists in the main menu Project, which is shown only, if you are on the production page. The local settings of a production don't have an effect on the operation of the productions called in it.
Before you can set the different items, the local options must be activated on the first page of the local options dialog. If local options are activated, which overwrite a project option, this will be show in the syntax tree after compiling by a red hook:
Remark: There also exist local options, which don't overwrite project options.
In the local options the option for the use of the global scanner is moderated
Global scanner for Literals, if possible
Global scanner for Regex, if possible
Activation of the global scanner will have an effect only, if the CaseSensitive option in the project and the local options are the same. Local deactivation of the global scanner is possible every time.
If options for the scanner are changed locally, then this change has an effect as soon as within the production a new token will be looked up. This happens as soon as a token is accepted in the production or, if the last token of a production called in the production is accepted. In the last case the successor of the called production is flooked up in the calling production.
Prod1 ::= Prod2 "c"
Prod2 ::= "a" "b"
If in Prod1 the blank is locally set to be ignored, but not in Prod2 and if in both the word separation is deactivated, the first row of texts is parsed correctly and the second isn't parsed. Whether the third text is parsed depends on the previous production.
1: "ab c", "abc" abc ", ab c "
2: "a bc"
3. " abc"
Remark: The ignored characters are accumulated by all tests. If no successor of a token is found in the actual rule, the successor of the rule itself will be looked up. But the look up will start after the characters already ignored.
Besides the items described at the project options, here exists one more option:
This option can be set also directly from the tool bar of the production page
If this option is activated, a special scanner will be created, which can make a test of all those tokens, which are contained in the first set of the rule.
If there are several compiled productions, for which interfaces are created, you can interactively change between them while transforming one text. After such a change, the interface scanner tests, whether the new start rule matches the actual text.
If the productions are compiled by Parse all scripts, this has the effect as if there were set the interface option for every production.
Normally a parser is called by the interface to its start rule. But it is possible also to call other productions directly, if the according interface method is created.
For example the TextTransformer itself parses the parameter of a production by a sub rule of the production parser.
This page belongs to the TextTransformer Documentation
|Home Content German|