External Rule References Handling
The Grammar External Rule References project properties section controls
how external rule references in ABNF grammars are handled by the
various tools of the environment.
External rule references handling is controlled by translation
rules. To configure those rules, select your project in the
Navigator view, open the contextual menu and
select Properties (or simply press Alt-Enter):
Translation Rules
Each translation rule has a name and a context in which it
applies. The context is one of:
- Runtime - the rule is used when a
grammar is loaded by one of the debugging/testing tools
(interpreter, single-stepper, coverage, etc.).
- ABNF to GrXML Conversion - the rule is used
when a grammar is converted to GrXML.
- ABNF to GSL Conversion - the rule is used
when a grammar is converted to GSL.
- GrXML to ABNF Conversion - the rule is used
when a GrXML grammar is converted to the ABNF format.
- GSL to ABNF Conversion - the rule is used
when a GSL grammar is converted to the ABNF format.
To add a new rule, press the Add... button. The following
dialog box appears:
A rule name must be chosen, as well as the context (the Apply
When drop-down menu).
The rule must also specify a condition and
an action. The condition determines whether a rule can
be applied to a given external rule reference. The action
specifies how to convert the rule reference.
A condition can be one of the following:
- Extension is X - the rule applies
when the external rule references a resource whose extension is X.
- Filename is X - the rule applies
when the external rule references a resource whose name
(excluding any protocol, host, or folder) is X.
- Path is X - the rule applies when
the external rule references a resource whose path (everything
except the resource name) is X.
- Full Path is X - the rule applies when
the external rule references a resource X.
An action can be one of the following:
- Extension is X - the rule changes
the external rule reference extension to X.
- Filename is X - the rule changes the
external rule reference name (excluding any protocol, host, or
folder) to X.
- Path is X - the rule changes the
path of the external rule reference (everything except the
resource name) to X.
- Full Path is X - the rule changes the
external rule reference to X.
To edit an existing rule, select the rule and press the
Edit... button. The same dialog box appears. To
delete a rule, select the rule and press the
Delete button.
Translation rules are tried in the order they are specified. To
change the order of the rules, select a rule and click on
the Up or Down button to move it up or down in the list.
Copyright © 2007,2008,2009,2010,2011 Nu Echo Inc.