-
Notifications
You must be signed in to change notification settings - Fork 15
RenameT
grammarware edited this page Jan 18, 2013
·
5 revisions
Labels, nonterminals, selectors and terminals can be renamed. Being in line with the fundamental notion of renaming, such renaming must be done consistently throughout the entire grammar, without introducing any clashes.
Renaming terminals breaks string-oriented (concrete) semantics, but is still possible. This variant is pretty-printed as renameT, its behaviour is essentially that of a sequential composition of abstractize and concretize, but its meaning is different: it changes an entity that is already present in the grammar, not removes or adds anything.
[terminal] rename:
from::terminal to::terminal
Given the input:
x:
"x"
After using this transformation:
renameT("x", "y");
Will look like this:
x:
"y"
shared/xsd/xbgf.xsd
shared/prolog/xbgf1.pro
shared/prolog/xbgf2.pro
shared/rascal/src/transform/library/Terminals.rsc
- Extract is a part of XBGF