Table of Contents

Class ParserDiagnostics

Namespace
Utils.Parser.Diagnostics
Assembly
Utils.Parser.Diagnostics.dll

Central registry of parser diagnostic descriptors shared by runtime and generator pipelines.

public static class ParserDiagnostics
Inheritance
ParserDiagnostics
Inherited Members

Fields

ActionIgnored

Action ignored by the current pipeline.

public static readonly ParserDiagnosticDescriptor ActionIgnored

Field Value

ParserDiagnosticDescriptor

AmbiguousAlternativesPruned

Equivalent parse branches were pruned using alternative priority.

public static readonly ParserDiagnosticDescriptor AmbiguousAlternativesPruned

Field Value

ParserDiagnosticDescriptor

AmbiguousConstructResolvedHeuristically

Ambiguous construct resolved heuristically.

public static readonly ParserDiagnosticDescriptor AmbiguousConstructResolvedHeuristically

Field Value

ParserDiagnosticDescriptor

AmbiguousImportedGrammar

An imported grammar name resolves to several source identities.

public static readonly ParserDiagnosticDescriptor AmbiguousImportedGrammar

Field Value

ParserDiagnosticDescriptor

BacktrackingUsed

Debug trace for backtracking usage.

public static readonly ParserDiagnosticDescriptor BacktrackingUsed

Field Value

ParserDiagnosticDescriptor

BestEffortRecoveryUsed

Best-effort recovery used.

public static readonly ParserDiagnosticDescriptor BestEffortRecoveryUsed

Field Value

ParserDiagnosticDescriptor

ChannelsBlockIgnored

channels block ignored.

public static readonly ParserDiagnosticDescriptor ChannelsBlockIgnored

Field Value

ParserDiagnosticDescriptor

DefaultBehaviorApplied

Default behavior applied.

public static readonly ParserDiagnosticDescriptor DefaultBehaviorApplied

Field Value

ParserDiagnosticDescriptor

DirectLeftRecursionDetected

Direct left recursion detected on a parser rule.

public static readonly ParserDiagnosticDescriptor DirectLeftRecursionDetected

Field Value

ParserDiagnosticDescriptor

ElementOptionIgnored

Element option on an alternative recognized but not applied by the current runtime model.

public static readonly ParserDiagnosticDescriptor ElementOptionIgnored

Field Value

ParserDiagnosticDescriptor

EmbeddedCodeCompilationFailed

Embedded ANTLR code compilation failed for the requested construct.

public static readonly ParserDiagnosticDescriptor EmbeddedCodeCompilationFailed

Field Value

ParserDiagnosticDescriptor

EmbeddedCodeCompilerNotConfigured

Embedded ANTLR code requires a compiler, but no compiler is configured.

public static readonly ParserDiagnosticDescriptor EmbeddedCodeCompilerNotConfigured

Field Value

ParserDiagnosticDescriptor

EmbeddedCodeConstructNotExecutedByGenerator

Embedded ANTLR code is visible to the source generator but is not promoted to executable hooks.

public static readonly ParserDiagnosticDescriptor EmbeddedCodeConstructNotExecutedByGenerator

Field Value

ParserDiagnosticDescriptor

EmbeddedCodeExecutionDisabled

Embedded ANTLR code execution is disabled by the current runtime policy.

public static readonly ParserDiagnosticDescriptor EmbeddedCodeExecutionDisabled

Field Value

ParserDiagnosticDescriptor

EmbeddedCodeLanguageUnsupported

Embedded ANTLR code language is not supported in the current execution path.

public static readonly ParserDiagnosticDescriptor EmbeddedCodeLanguageUnsupported

Field Value

ParserDiagnosticDescriptor

EmbeddedCodePreservedNotCompiled

Embedded ANTLR code is preserved as metadata and not compiled in the current execution path.

public static readonly ParserDiagnosticDescriptor EmbeddedCodePreservedNotCompiled

Field Value

ParserDiagnosticDescriptor

EmbeddedFooterInjectedByGenerator

Parser footer code is injected near the end of generated C# source by the source generator.

public static readonly ParserDiagnosticDescriptor EmbeddedFooterInjectedByGenerator

Field Value

ParserDiagnosticDescriptor

EmbeddedHeaderInjectedByGenerator

Parser header code is injected near the top of generated C# source by the source generator.

public static readonly ParserDiagnosticDescriptor EmbeddedHeaderInjectedByGenerator

Field Value

ParserDiagnosticDescriptor

EmbeddedMembersInjectedByGenerator

Parser members code is injected into the generated per-parse execution context by the source generator.

public static readonly ParserDiagnosticDescriptor EmbeddedMembersInjectedByGenerator

Field Value

ParserDiagnosticDescriptor

EnteringRule

Debug trace for entering a rule.

public static readonly ParserDiagnosticDescriptor EnteringRule

Field Value

ParserDiagnosticDescriptor

ExpectedTokenMissing

Expected token missing. Currently reserved for missing-token recovery diagnostics.

public static readonly ParserDiagnosticDescriptor ExpectedTokenMissing

Field Value

ParserDiagnosticDescriptor

FallbackStrategyUsed

Fallback strategy used.

public static readonly ParserDiagnosticDescriptor FallbackStrategyUsed

Field Value

ParserDiagnosticDescriptor

ImportCycleDetected

Import cycle detected while resolving grammars.

public static readonly ParserDiagnosticDescriptor ImportCycleDetected

Field Value

ParserDiagnosticDescriptor

ImportParsedButNotResolved

Import parsed but not resolved.

public static readonly ParserDiagnosticDescriptor ImportParsedButNotResolved

Field Value

ParserDiagnosticDescriptor

ImportedGrammarNotFound

Imported grammar could not be resolved.

public static readonly ParserDiagnosticDescriptor ImportedGrammarNotFound

Field Value

ParserDiagnosticDescriptor

ImportedRuleCollision

Imported rule declarations are ambiguous.

public static readonly ParserDiagnosticDescriptor ImportedRuleCollision

Field Value

ParserDiagnosticDescriptor

ImportedRuleIgnoredBecauseAlreadyDefined

Imported rule ignored because a primary rule already exists.

public static readonly ParserDiagnosticDescriptor ImportedRuleIgnoredBecauseAlreadyDefined

Field Value

ParserDiagnosticDescriptor

IndirectLeftRecursionNotSupported

Indirect left recursion is currently unsupported.

public static readonly ParserDiagnosticDescriptor IndirectLeftRecursionNotSupported

Field Value

ParserDiagnosticDescriptor

InlineActionStoredNotExecuted

Inline action stored but not executed.

public static readonly ParserDiagnosticDescriptor InlineActionStoredNotExecuted

Field Value

ParserDiagnosticDescriptor

InternalInconsistency

Internal consistency failure.

public static readonly ParserDiagnosticDescriptor InternalInconsistency

Field Value

ParserDiagnosticDescriptor

InvalidEmbeddedParserAttribute

An embedded parser attribute reference is invalid for the deliberately limited generated-C# compatibility subset.

public static readonly ParserDiagnosticDescriptor InvalidEmbeddedParserAttribute

Field Value

ParserDiagnosticDescriptor

InvalidGrammarRoot

Invalid grammar root node.

public static readonly ParserDiagnosticDescriptor InvalidGrammarRoot

Field Value

ParserDiagnosticDescriptor

LabelOnNonRuleReferenceIgnored

Label parsed on a non-rule-ref element and ignored.

public static readonly ParserDiagnosticDescriptor LabelOnNonRuleReferenceIgnored

Field Value

ParserDiagnosticDescriptor

LeavingRule

Debug trace for leaving a rule.

public static readonly ParserDiagnosticDescriptor LeavingRule

Field Value

ParserDiagnosticDescriptor

LeftRecursivePrecedencePartiallySupported

Left-recursive precedence support is partial compared to ANTLR4.

public static readonly ParserDiagnosticDescriptor LeftRecursivePrecedencePartiallySupported

Field Value

ParserDiagnosticDescriptor

LeftRecursiveRuleWithoutBaseAlternative

Left-recursive rule does not define any base alternative.

public static readonly ParserDiagnosticDescriptor LeftRecursiveRuleWithoutBaseAlternative

Field Value

ParserDiagnosticDescriptor

LexerRuleNotAllowedInParserGrammar

Lexer rule declared in a parser grammar.

public static readonly ParserDiagnosticDescriptor LexerRuleNotAllowedInParserGrammar

Field Value

ParserDiagnosticDescriptor

LexerRuleOptionsIgnored

Options block on a lexer rule recognized but ignored by the current runtime model.

public static readonly ParserDiagnosticDescriptor LexerRuleOptionsIgnored

Field Value

ParserDiagnosticDescriptor

LocalsIgnored

Compatibility alias for the legacy descriptor name.

[Obsolete("Use RuleLocalsIgnored. This alias is kept for compatibility.")]
public static readonly ParserDiagnosticDescriptor LocalsIgnored

Field Value

ParserDiagnosticDescriptor

NonProgressiveLeftRecursionStopped

Left-recursive extension stopped because no progress was observed.

public static readonly ParserDiagnosticDescriptor NonProgressiveLeftRecursionStopped

Field Value

ParserDiagnosticDescriptor

NonProgressiveQuantifierStopped

Quantifier iteration stopped because the inner rule made no progress.

public static readonly ParserDiagnosticDescriptor NonProgressiveQuantifierStopped

Field Value

ParserDiagnosticDescriptor

ParseBranchPruned

A parse branch was pruned during runtime branch selection.

public static readonly ParserDiagnosticDescriptor ParseBranchPruned

Field Value

ParserDiagnosticDescriptor

ParseFailure

Parsing failure.

public static readonly ParserDiagnosticDescriptor ParseFailure

Field Value

ParserDiagnosticDescriptor

ParseMemoHit

Memoization hit for parser rule evaluation.

public static readonly ParserDiagnosticDescriptor ParseMemoHit

Field Value

ParserDiagnosticDescriptor

ParseMemoMiss

Memoization miss for parser rule evaluation.

public static readonly ParserDiagnosticDescriptor ParseMemoMiss

Field Value

ParserDiagnosticDescriptor

ParserRuleNotAllowedInLexerGrammar

Parser rule declared in a lexer grammar.

public static readonly ParserDiagnosticDescriptor ParserRuleNotAllowedInLexerGrammar

Field Value

ParserDiagnosticDescriptor

ParserRuleOptionsIgnored

Options block on a parser rule recognized but ignored by the current runtime model.

public static readonly ParserDiagnosticDescriptor ParserRuleOptionsIgnored

Field Value

ParserDiagnosticDescriptor

ParserStateCycleDetected

Parsing branch aborted because the parser entered a repeated state.

public static readonly ParserDiagnosticDescriptor ParserStateCycleDetected

Field Value

ParserDiagnosticDescriptor

ParserStateRejected

Debug trace for parser states rejected by runtime safeguards.

public static readonly ParserDiagnosticDescriptor ParserStateRejected

Field Value

ParserDiagnosticDescriptor

PredicateOptionsIgnored

Semantic predicate options block (<fail=...>) recognized but not applied by the current runtime model.

public static readonly ParserDiagnosticDescriptor PredicateOptionsIgnored

Field Value

ParserDiagnosticDescriptor

ReturnsPartiallyApplied

Compatibility alias for the legacy descriptor name.

[Obsolete("Use RuleReturnsIgnored. This alias is kept for compatibility.")]
public static readonly ParserDiagnosticDescriptor ReturnsPartiallyApplied

Field Value

ParserDiagnosticDescriptor

RuleCallArgumentsPreservedAsMetadata

Rule-call arguments preserved as raw metadata; not evaluated and not bound to child parameters.

public static readonly ParserDiagnosticDescriptor RuleCallArgumentsPreservedAsMetadata

Field Value

ParserDiagnosticDescriptor

RuleExceptionMetadataIgnored

Rule throws/catch/finally metadata recognized but ignored by runtime semantics.

public static readonly ParserDiagnosticDescriptor RuleExceptionMetadataIgnored

Field Value

ParserDiagnosticDescriptor

RuleLocalsIgnored

Rule locals clause lacks typed and implicit runtime semantics.

public static readonly ParserDiagnosticDescriptor RuleLocalsIgnored

Field Value

ParserDiagnosticDescriptor

RuleReturnsIgnored

returns clause has no typed or implicit runtime semantics.

public static readonly ParserDiagnosticDescriptor RuleReturnsIgnored

Field Value

ParserDiagnosticDescriptor

RuntimeGeneratorMismatch

Runtime and generator support mismatch.

public static readonly ParserDiagnosticDescriptor RuntimeGeneratorMismatch

Field Value

ParserDiagnosticDescriptor

SemanticPredicateNotEnforced

Semantic predicate recognized but not enforced.

public static readonly ParserDiagnosticDescriptor SemanticPredicateNotEnforced

Field Value

ParserDiagnosticDescriptor

StaticDuplicateAlternativeRemoved

Strict duplicate alternatives were removed at resolution time.

public static readonly ParserDiagnosticDescriptor StaticDuplicateAlternativeRemoved

Field Value

ParserDiagnosticDescriptor

TokenMatched

Debug trace for matched token.

public static readonly ParserDiagnosticDescriptor TokenMatched

Field Value

ParserDiagnosticDescriptor

TokensBlockIgnored

tokens block ignored.

public static readonly ParserDiagnosticDescriptor TokensBlockIgnored

Field Value

ParserDiagnosticDescriptor

TrailingTokensAfterParse

Trailing tokens remain after parse.

public static readonly ParserDiagnosticDescriptor TrailingTokensAfterParse

Field Value

ParserDiagnosticDescriptor

UnexpectedToken

Unexpected token encountered.

public static readonly ParserDiagnosticDescriptor UnexpectedToken

Field Value

ParserDiagnosticDescriptor

UnknownLexerMode

Unknown lexer mode referenced by a lexer command.

public static readonly ParserDiagnosticDescriptor UnknownLexerMode

Field Value

ParserDiagnosticDescriptor

UnknownRuleReference

Unknown referenced rule.

public static readonly ParserDiagnosticDescriptor UnknownRuleReference

Field Value

ParserDiagnosticDescriptor

UnsupportedAntlrLanguageOptionIgnored

ANTLR language option ignored by this runtime.

public static readonly ParserDiagnosticDescriptor UnsupportedAntlrLanguageOptionIgnored

Field Value

ParserDiagnosticDescriptor

UnsupportedAntlrOptionIgnored

ANTLR option parsed but not supported by this runtime.

public static readonly ParserDiagnosticDescriptor UnsupportedAntlrOptionIgnored

Field Value

ParserDiagnosticDescriptor

UnsupportedLexerCommand

Unsupported lexer command encountered in grammar source.

public static readonly ParserDiagnosticDescriptor UnsupportedLexerCommand

Field Value

ParserDiagnosticDescriptor

Properties

All

Gets all known parser diagnostics keyed by code.

public static IReadOnlyDictionary<string, ParserDiagnosticDescriptor> All { get; }

Property Value

IReadOnlyDictionary<string, ParserDiagnosticDescriptor>

Remarks

Compatibility aliases such as ReturnsPartiallyApplied and LocalsIgnored are intentionally not listed separately because All is keyed by diagnostic code and exposes canonical descriptors.

Methods

TryGet(string, out ParserDiagnosticDescriptor)

Looks up a descriptor by diagnostic code.

public static bool TryGet(string code, out ParserDiagnosticDescriptor descriptor)

Parameters

code string

Diagnostic code.

descriptor ParserDiagnosticDescriptor

Resolved descriptor when found.

Returns

bool

true when the code exists.