redefine - grammarware/slps GitHub Wiki

Redefine is a replace variant that works on production level. When this transformation is executed, all current productions for the nonterminal are dropped, and all the given ones are added to the grammar.

This transformation is nothing more than syntactic sugar for an undefine followed directly with define. Having it as a separate transformation operator allows to more clearly distinguish completing the grammar with absent definitions (usually as initial correction step) and brutal nonterminal-level replacements (semantic revising).

Syntax

redefine:
        production+

Relevant files

See also

  • Redefine is a part of XBGF

Contributors

⚠️ **GitHub.com Fallback** ⚠️