Pidgin

Class OperatorTableRow<TToken, T>

Represents a row in a table of operators. Contains a collection of parsers for operators at a single precendence level.

Inheritance
  • object
  • OperatorTableRow<TToken, T>
Inherited Members
Declaration
public sealed class OperatorTableRow<TToken, T>
Type Parameters
Name Description

TToken

The type of the tokens in the parser's input stream.

T

The type of the value returned by the parser.

Constructors

OperatorTableRow(IEnumerable<Parser<TToken, Func<T, T, T>>>?, IEnumerable<Parser<TToken, Func<T, T, T>>>?, IEnumerable<Parser<TToken, Func<T, T, T>>>?, IEnumerable<Parser<TToken, Func<T, T>>>?, IEnumerable<Parser<TToken, Func<T, T>>>?)

Creates a row in a table of operators containing a collection of parsers for operators at a single precedence level.

Declaration
public OperatorTableRow(IEnumerable<Parser<TToken, Func<T, T, T>>>? infixNOps, IEnumerable<Parser<TToken, Func<T, T, T>>>? infixLOps, IEnumerable<Parser<TToken, Func<T, T, T>>>? infixROps, IEnumerable<Parser<TToken, Func<T, T>>>? prefixOps, IEnumerable<Parser<TToken, Func<T, T>>>? postfixOps)
Parameters
Type Name Description

IEnumerable<Parser<TToken, Func<T, T, T>>>

infixNOps

A collection of parsers for the non-associative infix operators at this precedence level.

IEnumerable<Parser<TToken, Func<T, T, T>>>

infixLOps

A collection of parsers for the left-associative infix operators at this precedence level.

IEnumerable<Parser<TToken, Func<T, T, T>>>

infixROps

A collection of parsers for the right-associative infix operators at this precedence level.

IEnumerable<Parser<TToken, Func<T, T>>>

prefixOps

A collection of parsers for the prefix operators at this precedence level.

IEnumerable<Parser<TToken, Func<T, T>>>

postfixOps

A collection of parsers for the postfix operators at this precedence level.

Properties

Empty

An empty row in a table of operators.

Declaration
public static OperatorTableRow<TToken, T> Empty { get; }
Property Value
Type Description

OperatorTableRow<TToken, T>

InfixLOps

A collection of parsers for the left-associative infix operators at this precedence level.

Declaration
public IEnumerable<Parser<TToken, Func<T, T, T>>> InfixLOps { get; }
Property Value
Type Description

IEnumerable<Parser<TToken, Func<T, T, T>>>

InfixNOps

A collection of parsers for the non-associative infix operators at this precedence level.

Declaration
public IEnumerable<Parser<TToken, Func<T, T, T>>> InfixNOps { get; }
Property Value
Type Description

IEnumerable<Parser<TToken, Func<T, T, T>>>

InfixROps

A collection of parsers for the right-associative infix operators at this precedence level.

Declaration
public IEnumerable<Parser<TToken, Func<T, T, T>>> InfixROps { get; }
Property Value
Type Description

IEnumerable<Parser<TToken, Func<T, T, T>>>

PostfixOps

A collection of parsers for the postfix operators at this precedence level.

Declaration
public IEnumerable<Parser<TToken, Func<T, T>>> PostfixOps { get; }
Property Value
Type Description

IEnumerable<Parser<TToken, Func<T, T>>>

PrefixOps

A collection of parsers for the prefix operators at this precedence level.

Declaration
public IEnumerable<Parser<TToken, Func<T, T>>> PrefixOps { get; }
Property Value
Type Description

IEnumerable<Parser<TToken, Func<T, T>>>

Methods

And(OperatorTableRow<TToken, T>)

Combine two rows at the same precedence level.

Declaration
public OperatorTableRow<TToken, T> And(OperatorTableRow<TToken, T> otherRow)
Parameters
Type Name Description

OperatorTableRow<TToken, T>

otherRow

A collection of parsers for operators.

Returns
Type Description

OperatorTableRow<TToken, T>

The current collection of parsers combined with otherRow.