Interface IProductionBuilder<TSelf>
Provides a uniform API surface for operations common to all production builders.
public interface IProductionBuilder<TSelf> where TSelf : IProductionBuilder<TSelf>
Type Parameters
TSelfThe 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
symbolIGrammarSymbolThe symbol to append.
Returns
- TSelf
A production builder with
symboladded 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
precedenceTokenobjectAn object that represents the production in associativity groups.
Returns
- TSelf
A production builder with the precedence token changed to
precedenceToken.