Table of Contents

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

LrEndOfFileAction
See Also

Error

An LrEndOfFileAction that will cause a syntax error.

public static LrEndOfFileAction Error { get; }

Property Value

LrEndOfFileAction
See Also

IsAccept

Whether this LrEndOfFileAction will cause the input to be accepted.

public bool IsAccept { get; }

Property Value

bool
See Also

IsError

Whether this LrEndOfFileAction will cause a syntax error.

public bool IsError { get; }

Property Value

bool
See Also

IsReduce

Whether this LrEndOfFileAction will reduce a production.

public bool IsReduce { get; }

Property Value

bool
See Also

ReduceProduction

The production this LrEndOfFileAction will reduce.

public ProductionHandle ReduceProduction { get; }

Property Value

ProductionHandle

Exceptions

InvalidOperationException

The IsReduce property is false.

Methods

CreateReduce(ProductionHandle)

Creates an LrEndOfFileAction that will reduce the specified ProductionHandle.

public static LrEndOfFileAction CreateReduce(ProductionHandle production)

Parameters

production ProductionHandle

The production to reuse.

Returns

LrEndOfFileAction

Exceptions

ArgumentNullException

production's HasValue property is false.

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 LrEndOfFileAction

An object to compare with this object.

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

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 LrEndOfFileAction

The first action.

right LrEndOfFileAction

The second action.

Returns

bool

operator !=(LrEndOfFileAction, LrEndOfFileAction)

Checks two LrEndOfFileActions for inequality.

public static bool operator !=(LrEndOfFileAction left, LrEndOfFileAction right)

Parameters

left LrEndOfFileAction

The first action.

right LrEndOfFileAction

The second action.

Returns

bool