Tptp.Printer.Shapes (Tptp v0.1.0)

Copy Markdown View Source

How each node kind is spelled, derived from the grammar.

DO NOT EDIT. Generated by mix tptp.gen from SyntaxBNF-v9.3.1.3.

A shape is a list of items in source order: :slot takes the next child, a binary is a literal to emit. {:separated, ","} is a variadic list — every child, joined by that literal.

Keyed by kind and child count, which the grammar makes sufficient. Anything not listed is a leaf, and prints its own text.

A separated list is the exception, and matches any arity: the grammar writes <tff_arguments> ::= <tff_term><comma_tff_term>*, so its production has two symbols however many arguments the call actually has.

Summary

Types

One item of a shape: a child slot or a literal.

t()

How a node kind is spelled.

Functions

The shape for a node kind at a child count, or nil for a leaf.

Types

item()

@type item() :: :slot | binary()

One item of a shape: a child slot or a literal.

t()

@type t() :: [item()] | {:separated, binary()}

How a node kind is spelled.

Functions

shape(kind, arity)

@spec shape(atom(), non_neg_integer()) :: t() | nil

The shape for a node kind at a child count, or nil for a leaf.