Skip to content
grammarware edited this page Jan 19, 2013 · 3 revisions

Just like unchain is a specific form of inline, chaining is a disciplined form of extraction. The argument production rule will be a part of the resulting grammar; it is a chain production rule, i.e., a production rule with a nonterminal as its defining expression. That nonterminal is the one whose definition is to be extracted. That definition is the defining expression of the production (from the input grammar) whose defined nonterminal and label (if any) matches with the argument production.

Syntax

chain:
        production

Example

In the same way it is removed in the example for unchain, the chain production rule can be added to the grammar. The transformation that reverts the impact of the previous unchain, looks like this:

chain(
 [binary] expr:
        binexpr
);

Relevant files

See also

  • Chain is a part of XBGF

Contributors

Clone this wiki locally