ParseResult

Description

sealed class Tinman.Core.Parsing.ParseResult

Represents the result of a parsing process.

Public / Methods

ToString


public method ToString → (2)

input in : string

The input to use for generating nice error messages or null.

additionalInfo opt : bool = true

Output additional information (terminal matches, non-terminal matches, left recursion)?

returns → string

The human-readable string representation.

Returns a human-readable string representation of this parse result.

Validate


public method Validate → ()

Validates that parsing has succeeded.

ValidatingException

If the validation has failed.

Public / Attributes

Ast


public readonly attribute Ast → (AstNode)

The root AST node.

Will be null if parsing has failed.

CountLeftRecursion


public readonly attribute CountLeftRecursion → (int32)

Maximum depth of the left recursion detection stack.

CountNonTerminal


public readonly attribute CountNonTerminal → (int64)

The number of non-terminal rule invocations.

CountTerminal


public readonly attribute CountTerminal → (int64)

The number of terminal rule invocations.

Errors


public readonly attribute Errors → (ValidateResult)

The syntax errors.

IsFailure


public attribute IsFailure → (get)

value : bool

true if parsing has failed, false if not.

Has parsing failed?

IsSuccess


public attribute IsSuccess → (get)

value : bool

true if parsing has succeeded, false if not.

Has parsing succeeded?

See also

ParseResult.Ast