Struct LrEndOfFileAction
- Namespace
- Farkle.Grammars.StateMachines
- Assembly
- Farkle.dll
Specifies what an LR parser will do if it encounters the end of input.
public readonly struct LrEndOfFileAction : IEquatable<LrEndOfFileAction>
- Implements
- Inherited Members
Properties
Accept
An LrEndOfFileAction that will cause the input to be accepted.
public static LrEndOfFileAction Accept { get; }
Property Value
- See Also
Error
An LrEndOfFileAction that will cause a syntax error.
public static LrEndOfFileAction Error { get; }
Property Value
- See Also
IsAccept
Whether this LrEndOfFileAction will cause the input to be accepted.
public bool IsAccept { get; }
Property Value
- See Also
IsError
Whether this LrEndOfFileAction will cause a syntax error.
public bool IsError { get; }
Property Value
- See Also
IsReduce
Whether this LrEndOfFileAction will reduce a production.
public bool IsReduce { get; }
Property Value
- See Also
ReduceProduction
The production this LrEndOfFileAction will reduce.
public ProductionHandle ReduceProduction { get; }
Property Value
Exceptions
Methods
CreateReduce(ProductionHandle)
Creates an LrEndOfFileAction that will reduce the specified ProductionHandle.
public static LrEndOfFileAction CreateReduce(ProductionHandle production)
Parameters
production
ProductionHandleThe production to reuse.
Returns
Exceptions
- See Also
Equals(LrEndOfFileAction)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(LrEndOfFileAction other)
Parameters
other
LrEndOfFileActionAn object to compare with this object.
Returns
Equals(object?)
Indicates whether this instance and a specified object are equal.
public override bool Equals(object? other)
Parameters
other
object
Returns
- bool
true if
obj
and this instance are the same type and represent the same value; otherwise, false.
GetHashCode()
Returns the hash code for this instance.
public override int GetHashCode()
Returns
- int
A 32-bit signed integer that is the hash code for this instance.
Operators
operator ==(LrEndOfFileAction, LrEndOfFileAction)
Checks two LrEndOfFileActions for equality.
public static bool operator ==(LrEndOfFileAction left, LrEndOfFileAction right)
Parameters
left
LrEndOfFileActionThe first action.
right
LrEndOfFileActionThe second action.
Returns
operator !=(LrEndOfFileAction, LrEndOfFileAction)
Checks two LrEndOfFileActions for inequality.
public static bool operator !=(LrEndOfFileAction left, LrEndOfFileAction right)
Parameters
left
LrEndOfFileActionThe first action.
right
LrEndOfFileActionThe second action.