YaccConstructor


t<'patt, 'expr>

Namespace: Yard.Core
Parent Module: Production

t<'patt,'expr> - Type of production node in derivation tree. 'patt - type of l-attributes. 'expr - type of expressions in action code.

Union Cases

Union CaseDescription
PAlt(t<'patt,'expr>,t<'patt,'expr>)
Signature: t<'patt,'expr> * t<'patt,'expr>

Alternative (e1 | e2)

PConj(t<'patt,'expr>,t<'patt,'expr>)
Signature: t<'patt,'expr> * t<'patt,'expr>

Conjunction (e1 & e2)

PLiteral(t)
Signature: t

Literal. We can use constants ("if" and "then" in ' .."if" expr "then" expr...')

PMany(t<'patt,'expr>)
Signature: t<'patt,'expr>

expr*

PMetaRef(...)
Signature: t * 'expr option * t<'patt,'expr> list

Reference to metarule inside production (mr<> in rule "a: mr<> y z")

PNeg(t<'patt,'expr>)
Signature: t<'patt,'expr>

Negation

POpt(t<'patt,'expr>)
Signature: t<'patt,'expr>

expr?

PPerm(t<'patt,'expr> list)
Signature: t<'patt,'expr> list

Permutation (A || B || C)

PRef(t,'expr option)
Signature: t * 'expr option

Reference to other rule inside production. With an optional args list.

PRepet(...)
Signature: t<'patt,'expr> * int option * int option

Extended regexp repetition, "man egrep" for details

PSeq(...)
Signature: elem<'patt,'expr> list * 'expr option * DLabel option

Sequence * attribute. (Attribute is always applied to sequence)

PShuff(t<'patt,'expr>,t<'patt,'expr>)
Signature: t<'patt,'expr> * t<'patt,'expr>

Shuffle (e1 || e2)

PSome(t<'patt,'expr>)
Signature: t<'patt,'expr>

expr+

PToken(t)
Signature: t

Token itself. Final element of parsing.

Fork me on GitHub