Skip to content
grammarware edited this page Jan 21, 2013 · 6 revisions

Turn a definition based on multiple productions into a top choice-based one.

The action is a reverse of vertical.

Syntax

horizontal:
        nonterminal::nonterminal

Example

If some or all of the original production rules are labelled:

[onedec] decs:
        dec
[moredecs] decs:
        dec decs

then, after using this transformation:

horizontal(decs);

each label is converted to a selector in a corresponding place:

decs:
        onedec::dec
        moredecs::(dec decs)

Relevant files

See also

  • Horizontal is a part of XBGF

Contributors

Clone this wiki locally