Skip to content
grammarware edited this page Jan 19, 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.

Syntax

[terminal] rename:
        from::terminal to::terminal

Example

Given the input:

x:
        "x"

After using this transformation:

renameT("x", "y");

Will look like this:

x:
        "y"

Relevant files

See also

  • RenameT is a part of XBGF

Contributors

Clone this wiki locally