Introduce - grammarware/slps GitHub Wiki
A definition of a fresh nonterminal is added. The addV operator should be used instead, if the nonterminal is already defined, is to be merely extended. The define operator should be used instead, if the nonterminal is readily in use, but merely lacks a definition.
Syntax
introduce:
production+
Example
For instance,
a:
b
b:
ε
After using this transformation:
introduce(
c:
a
c:
b
);
Will look like this:
a:
b
b:
ε
c:
a
c:
b
Relevant files
shared/prolog/xbgf1.pro
shared/prolog/xbgf2.pro
shared/rascal/src/transform/library/Productions.rsc
shared/xsd/xbgf.xsd
See also
- Introduce is a part of XBGF