appear - grammarware/slps GitHub Wiki

The purpose of this transformation operator is to insert an nillable symbol (i.e., reducible to an empty sequence) at any place in any existing grammar production rule. It takes a production rule as an input. Inside that, one nillable subexpression should be marked.

Syntax

appear:
        marked-production

Example

Given the input:

foo:
        bar

After using this transformation:

appear(
 foo:
        bar <qux?>
);

The result will look like this:

foo:
        bar qux?

Relevant files

See also

  • Appear is a part of XBGF

Contributors

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