-
Notifications
You must be signed in to change notification settings - Fork 15
Unite
grammarware edited this page Jan 18, 2013
·
5 revisions
Two nonterminals, say x and y, are merged (possibly recursively). That is, the definitions of x and y (i.e., their productions) are merged in one definition while preserving the nonterminal y and replacing all occurrences of x (in the definition of x and anywhere else) by y.
unite:
add::nonterminal to::nonterminal
Given the input:
foo:
"a"
foo:
"b"
bar:
"d"
After using this transformation:
unite(bar, foo);
The result will look like this:
foo:
"a"
foo:
"b"
foo:
"d"
shared/xsd/xbgf.xsd
shared/prolog/xbgf1.pro
shared/prolog/xbgf2.pro
shared/rascal/src/transform/library/Nonterminals.rsc
- Extract is a part of XBGF