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

Production rules can be removed from existing vertical definitions. The remaining definition must not become empty, i.e., undefined. There is the undefine operator that can be applied in that case. There is also a horizontal mode (cf. RemoveH) of removing branches from choices.

Syntax

[vertical] remove:
        production

Vertical removal operates on the level of productions: it takes away one production rule for some nonterminal leaving at least one more in the grammar.

Example

Given the input:

expr:
        int
expr:
        id

After using this transformation:

removeV(
 expr:
        id
);

The result will look like this:

expr:
        int

Relevant files

See also

  • RemoveV is a part of XBGF

Contributors

Clone this wiki locally