-
Notifications
You must be signed in to change notification settings - Fork 15
Chain
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.
chain:
production
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
);
- Chain is a part of XBGF