Class OperatorTableRow<TToken, T>
Represents a row in a table of operators. Contains a collection of parsers for operators at a single precendence level.
Namespace: Pidgin.Expression
Assembly: Pidgin.dll
Syntax
public sealed class OperatorTableRow<TToken, T> : object
Type Parameters
Name | Description |
---|---|
TToken | |
T |
Constructors
| Improve this Doc View SourceOperatorTableRow(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
| Improve this Doc View SourceEmpty
An empty row in a table of operators
Declaration
public static OperatorTableRow<TToken, T> Empty { get; }
Property Value
Type | Description |
---|---|
OperatorTableRow<TToken, T> | An empty row in a table of operators |
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>>> | A collection of parsers for the left-associative infix operators at this precedence level |
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>>> | A collection of parsers for the non-associative infix operators at this precedence level |
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>>> | A collection of parsers for the right-associative infix operators at this precedence level |
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>>> | A collection of parsers for the postfix operators at this precedence level |
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>>> | A collection of parsers for the prefix operators at this precedence level |
Methods
| Improve this Doc View SourceAnd(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 |