Farkle


Nonterminal Type

A nonterminal that does not have an associated return type.

This type is easier to work with if you want to just define a grammar as you would do in GOLD Parser. Because it only implements the untyped DesigntimeFarkle interface, it can only be Appended but not Extended in production builders. Overall, it is a normal designtime Farkle.

User code must not inherit from this class, or an exception might be thrown.

Instance members

Instance member Description

this.Name

Full Usage: this.Name

Returns: string

The nonterminal's name.

Returns: string

this.SetProductions

Full Usage: this.SetProductions

Parameters:
Modifiers: abstract

This method must only be called once, and before building a designtime Farkle containing this nonterminal. Subsequent calls, and these after building are ignored. It accepts unFinished production builders with no significant members.

firstProd : ProductionBuilder
prods : ProductionBuilder[]

Static members

Static member Description

Nonterminal.Create(name, firstProd, prods)

Full Usage: Nonterminal.Create(name, firstProd, prods)

Parameters:
Returns: DesigntimeFarkle

Creates an untyped DesigntimeFarkle from a nonterminal with the given name and productions, declared as production builders.

name : string
firstProd : ProductionBuilder
prods : ProductionBuilder[]
Returns: DesigntimeFarkle

Nonterminal.Create(name)

Full Usage: Nonterminal.Create(name)

Parameters:
    name : string

Returns: Nonterminal

Creates an untyped Nonterminal. Its productions must be set later.

This function is useful for the creation of recursive productions.

name : string
Returns: Nonterminal