Table of Contents

Interface IProductionBuilder<TSelf>

Namespace
Farkle.Builder
Assembly
Farkle.dll

Provides a uniform API surface for operations common to all production builders.

public interface IProductionBuilder<TSelf> where TSelf : IProductionBuilder<TSelf>

Type Parameters

TSelf

The type that implements the interface.

Remarks

This interface cannot be implemented by user code.

Methods

Append(IGrammarSymbol)

Appends an IGrammarSymbol to the production.

TSelf Append(IGrammarSymbol symbol)

Parameters

symbol IGrammarSymbol

The symbol to append.

Returns

TSelf

A production builder with symbol added to the production's end.

Remarks

If symbol's actual type is a typed IGrammarSymbol<T>, appending it to a production will not prevent its semantic actions from being executed.

WithPrecedence(object)

Changes the precedence token of the production.

TSelf WithPrecedence(object precedenceToken)

Parameters

precedenceToken object

An object that represents the production in associativity groups.

Returns

TSelf

A production builder with the precedence token changed to precedenceToken.