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
AmbiguousAlternativesPruned
Equivalent parse branches were pruned using alternative priority.
public static readonly ParserDiagnosticDescriptor AmbiguousAlternativesPruned
Field Value
AmbiguousConstructResolvedHeuristically
Ambiguous construct resolved heuristically.
public static readonly ParserDiagnosticDescriptor AmbiguousConstructResolvedHeuristically
Field Value
AmbiguousImportedGrammar
An imported grammar name resolves to several source identities.
public static readonly ParserDiagnosticDescriptor AmbiguousImportedGrammar
Field Value
BacktrackingUsed
Debug trace for backtracking usage.
public static readonly ParserDiagnosticDescriptor BacktrackingUsed
Field Value
BestEffortRecoveryUsed
Best-effort recovery used.
public static readonly ParserDiagnosticDescriptor BestEffortRecoveryUsed
Field Value
ChannelsBlockIgnored
channels block ignored.
public static readonly ParserDiagnosticDescriptor ChannelsBlockIgnored
Field Value
DefaultBehaviorApplied
Default behavior applied.
public static readonly ParserDiagnosticDescriptor DefaultBehaviorApplied
Field Value
DirectLeftRecursionDetected
Direct left recursion detected on a parser rule.
public static readonly ParserDiagnosticDescriptor DirectLeftRecursionDetected
Field Value
ElementOptionIgnored
Element option on an alternative recognized but not applied by the current runtime model.
public static readonly ParserDiagnosticDescriptor ElementOptionIgnored
Field Value
EmbeddedCodeCompilationFailed
Embedded ANTLR code compilation failed for the requested construct.
public static readonly ParserDiagnosticDescriptor EmbeddedCodeCompilationFailed
Field Value
EmbeddedCodeCompilerNotConfigured
Embedded ANTLR code requires a compiler, but no compiler is configured.
public static readonly ParserDiagnosticDescriptor EmbeddedCodeCompilerNotConfigured
Field Value
EmbeddedCodeConstructNotExecutedByGenerator
Embedded ANTLR code is visible to the source generator but is not promoted to executable hooks.
public static readonly ParserDiagnosticDescriptor EmbeddedCodeConstructNotExecutedByGenerator
Field Value
EmbeddedCodeExecutionDisabled
Embedded ANTLR code execution is disabled by the current runtime policy.
public static readonly ParserDiagnosticDescriptor EmbeddedCodeExecutionDisabled
Field Value
EmbeddedCodeLanguageUnsupported
Embedded ANTLR code language is not supported in the current execution path.
public static readonly ParserDiagnosticDescriptor EmbeddedCodeLanguageUnsupported
Field Value
EmbeddedCodePreservedNotCompiled
Embedded ANTLR code is preserved as metadata and not compiled in the current execution path.
public static readonly ParserDiagnosticDescriptor EmbeddedCodePreservedNotCompiled
Field Value
EmbeddedFooterInjectedByGenerator
Parser footer code is injected near the end of generated C# source by the source generator.
public static readonly ParserDiagnosticDescriptor EmbeddedFooterInjectedByGenerator
Field Value
EmbeddedHeaderInjectedByGenerator
Parser header code is injected near the top of generated C# source by the source generator.
public static readonly ParserDiagnosticDescriptor EmbeddedHeaderInjectedByGenerator
Field Value
EmbeddedMembersInjectedByGenerator
Parser members code is injected into the generated per-parse execution context by the source generator.
public static readonly ParserDiagnosticDescriptor EmbeddedMembersInjectedByGenerator
Field Value
EnteringRule
Debug trace for entering a rule.
public static readonly ParserDiagnosticDescriptor EnteringRule
Field Value
ExpectedTokenMissing
Expected token missing. Currently reserved for missing-token recovery diagnostics.
public static readonly ParserDiagnosticDescriptor ExpectedTokenMissing
Field Value
FallbackStrategyUsed
Fallback strategy used.
public static readonly ParserDiagnosticDescriptor FallbackStrategyUsed
Field Value
ImportCycleDetected
Import cycle detected while resolving grammars.
public static readonly ParserDiagnosticDescriptor ImportCycleDetected
Field Value
ImportParsedButNotResolved
Import parsed but not resolved.
public static readonly ParserDiagnosticDescriptor ImportParsedButNotResolved
Field Value
ImportedGrammarNotFound
Imported grammar could not be resolved.
public static readonly ParserDiagnosticDescriptor ImportedGrammarNotFound
Field Value
ImportedRuleCollision
Imported rule declarations are ambiguous.
public static readonly ParserDiagnosticDescriptor ImportedRuleCollision
Field Value
ImportedRuleIgnoredBecauseAlreadyDefined
Imported rule ignored because a primary rule already exists.
public static readonly ParserDiagnosticDescriptor ImportedRuleIgnoredBecauseAlreadyDefined
Field Value
IndirectLeftRecursionNotSupported
Indirect left recursion is currently unsupported.
public static readonly ParserDiagnosticDescriptor IndirectLeftRecursionNotSupported
Field Value
InlineActionStoredNotExecuted
Inline action stored but not executed.
public static readonly ParserDiagnosticDescriptor InlineActionStoredNotExecuted
Field Value
InternalInconsistency
Internal consistency failure.
public static readonly ParserDiagnosticDescriptor InternalInconsistency
Field Value
InvalidEmbeddedParserAttribute
An embedded parser attribute reference is invalid for the deliberately limited generated-C# compatibility subset.
public static readonly ParserDiagnosticDescriptor InvalidEmbeddedParserAttribute
Field Value
InvalidGrammarRoot
Invalid grammar root node.
public static readonly ParserDiagnosticDescriptor InvalidGrammarRoot
Field Value
LabelOnNonRuleReferenceIgnored
Label parsed on a non-rule-ref element and ignored.
public static readonly ParserDiagnosticDescriptor LabelOnNonRuleReferenceIgnored
Field Value
LeavingRule
Debug trace for leaving a rule.
public static readonly ParserDiagnosticDescriptor LeavingRule
Field Value
LeftRecursivePrecedencePartiallySupported
Left-recursive precedence support is partial compared to ANTLR4.
public static readonly ParserDiagnosticDescriptor LeftRecursivePrecedencePartiallySupported
Field Value
LeftRecursiveRuleWithoutBaseAlternative
Left-recursive rule does not define any base alternative.
public static readonly ParserDiagnosticDescriptor LeftRecursiveRuleWithoutBaseAlternative
Field Value
LexerRuleNotAllowedInParserGrammar
Lexer rule declared in a parser grammar.
public static readonly ParserDiagnosticDescriptor LexerRuleNotAllowedInParserGrammar
Field Value
LexerRuleOptionsIgnored
Options block on a lexer rule recognized but ignored by the current runtime model.
public static readonly ParserDiagnosticDescriptor LexerRuleOptionsIgnored
Field Value
LocalsIgnored
Compatibility alias for the legacy descriptor name.
[Obsolete("Use RuleLocalsIgnored. This alias is kept for compatibility.")]
public static readonly ParserDiagnosticDescriptor LocalsIgnored
Field Value
NonProgressiveLeftRecursionStopped
Left-recursive extension stopped because no progress was observed.
public static readonly ParserDiagnosticDescriptor NonProgressiveLeftRecursionStopped
Field Value
NonProgressiveQuantifierStopped
Quantifier iteration stopped because the inner rule made no progress.
public static readonly ParserDiagnosticDescriptor NonProgressiveQuantifierStopped
Field Value
ParseBranchPruned
A parse branch was pruned during runtime branch selection.
public static readonly ParserDiagnosticDescriptor ParseBranchPruned
Field Value
ParseFailure
Parsing failure.
public static readonly ParserDiagnosticDescriptor ParseFailure
Field Value
ParseMemoHit
Memoization hit for parser rule evaluation.
public static readonly ParserDiagnosticDescriptor ParseMemoHit
Field Value
ParseMemoMiss
Memoization miss for parser rule evaluation.
public static readonly ParserDiagnosticDescriptor ParseMemoMiss
Field Value
ParserRuleNotAllowedInLexerGrammar
Parser rule declared in a lexer grammar.
public static readonly ParserDiagnosticDescriptor ParserRuleNotAllowedInLexerGrammar
Field Value
ParserRuleOptionsIgnored
Options block on a parser rule recognized but ignored by the current runtime model.
public static readonly ParserDiagnosticDescriptor ParserRuleOptionsIgnored
Field Value
ParserStateCycleDetected
Parsing branch aborted because the parser entered a repeated state.
public static readonly ParserDiagnosticDescriptor ParserStateCycleDetected
Field Value
ParserStateRejected
Debug trace for parser states rejected by runtime safeguards.
public static readonly ParserDiagnosticDescriptor ParserStateRejected
Field Value
PredicateOptionsIgnored
Semantic predicate options block (<fail=...>) recognized but not applied by the current runtime model.
public static readonly ParserDiagnosticDescriptor PredicateOptionsIgnored
Field Value
ReturnsPartiallyApplied
Compatibility alias for the legacy descriptor name.
[Obsolete("Use RuleReturnsIgnored. This alias is kept for compatibility.")]
public static readonly ParserDiagnosticDescriptor ReturnsPartiallyApplied
Field Value
RuleCallArgumentsPreservedAsMetadata
Rule-call arguments preserved as raw metadata; not evaluated and not bound to child parameters.
public static readonly ParserDiagnosticDescriptor RuleCallArgumentsPreservedAsMetadata
Field Value
RuleExceptionMetadataIgnored
Rule throws/catch/finally metadata recognized but ignored by runtime semantics.
public static readonly ParserDiagnosticDescriptor RuleExceptionMetadataIgnored
Field Value
RuleLocalsIgnored
Rule locals clause lacks typed and implicit runtime semantics.
public static readonly ParserDiagnosticDescriptor RuleLocalsIgnored
Field Value
RuleReturnsIgnored
returns clause has no typed or implicit runtime semantics.
public static readonly ParserDiagnosticDescriptor RuleReturnsIgnored
Field Value
RuntimeGeneratorMismatch
Runtime and generator support mismatch.
public static readonly ParserDiagnosticDescriptor RuntimeGeneratorMismatch
Field Value
SemanticPredicateNotEnforced
Semantic predicate recognized but not enforced.
public static readonly ParserDiagnosticDescriptor SemanticPredicateNotEnforced
Field Value
StaticDuplicateAlternativeRemoved
Strict duplicate alternatives were removed at resolution time.
public static readonly ParserDiagnosticDescriptor StaticDuplicateAlternativeRemoved
Field Value
TokenMatched
Debug trace for matched token.
public static readonly ParserDiagnosticDescriptor TokenMatched
Field Value
TokensBlockIgnored
tokens block ignored.
public static readonly ParserDiagnosticDescriptor TokensBlockIgnored
Field Value
TrailingTokensAfterParse
Trailing tokens remain after parse.
public static readonly ParserDiagnosticDescriptor TrailingTokensAfterParse
Field Value
UnexpectedToken
Unexpected token encountered.
public static readonly ParserDiagnosticDescriptor UnexpectedToken
Field Value
UnknownLexerMode
Unknown lexer mode referenced by a lexer command.
public static readonly ParserDiagnosticDescriptor UnknownLexerMode
Field Value
UnknownRuleReference
Unknown referenced rule.
public static readonly ParserDiagnosticDescriptor UnknownRuleReference
Field Value
UnsupportedAntlrLanguageOptionIgnored
ANTLR language option ignored by this runtime.
public static readonly ParserDiagnosticDescriptor UnsupportedAntlrLanguageOptionIgnored
Field Value
UnsupportedAntlrOptionIgnored
ANTLR option parsed but not supported by this runtime.
public static readonly ParserDiagnosticDescriptor UnsupportedAntlrOptionIgnored
Field Value
UnsupportedLexerCommand
Unsupported lexer command encountered in grammar source.
public static readonly ParserDiagnosticDescriptor UnsupportedLexerCommand
Field Value
Properties
All
Gets all known parser diagnostics keyed by code.
public static IReadOnlyDictionary<string, ParserDiagnosticDescriptor> All { get; }
Property Value
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
codestringDiagnostic code.
descriptorParserDiagnosticDescriptorResolved descriptor when found.
Returns
- bool
truewhen the code exists.