Interface IGrammarValidatorErrorMessageProvider
Hierarchy
-
IGrammarValidatorErrorMessageProvider
Methods
buildAlternationAmbiguityError
- buildAlternationAmbiguityError(options: { alternation: Alternation; ambiguityIndices: number[]; prefixPath: TokenType[]; topLevelRule: Rule }): string
-
Parameters
-
options: { alternation: Alternation; ambiguityIndices: number[]; prefixPath: TokenType[]; topLevelRule: Rule }
-
-
ambiguityIndices: number[]
-
-
topLevelRule: Rule
Returns string
buildAlternationPrefixAmbiguityError
- buildAlternationPrefixAmbiguityError(options: { alternation: Alternation; ambiguityIndices: number[]; prefixPath: TokenType[]; topLevelRule: Rule }): string
-
Parameters
-
options: { alternation: Alternation; ambiguityIndices: number[]; prefixPath: TokenType[]; topLevelRule: Rule }
-
-
ambiguityIndices: number[]
-
-
topLevelRule: Rule
Returns string
buildDuplicateFoundError
-
Parameters
Returns string
buildDuplicateRuleNameError
- buildDuplicateRuleNameError(options: { grammarName: string; topLevelRule: Rule | string }): string
-
Parameters
-
options: { grammarName: string; topLevelRule: Rule | string }
-
grammarName: string
-
topLevelRule: Rule | string
Returns string
buildEmptyAlternationError
- buildEmptyAlternationError(options: { alternation: Alternation; emptyChoiceIdx: number; topLevelRule: Rule }): any
-
Parameters
-
options: { alternation: Alternation; emptyChoiceIdx: number; topLevelRule: Rule }
-
-
emptyChoiceIdx: number
-
topLevelRule: Rule
Returns any
buildEmptyRepetitionError
-
Parameters
Returns string
buildInvalidRuleNameError
- buildInvalidRuleNameError(options: { expectedPattern: RegExp; topLevelRule: Rule }): string
-
Parameters
-
options: { expectedPattern: RegExp; topLevelRule: Rule }
-
expectedPattern: RegExp
-
topLevelRule: Rule
Returns string
buildLeftRecursionError
- buildLeftRecursionError(options: { leftRecursionPath: Rule[]; topLevelRule: Rule }): string
-
Parameters
-
options: { leftRecursionPath: Rule[]; topLevelRule: Rule }
-
leftRecursionPath: Rule[]
-
topLevelRule: Rule
Returns string
buildNamespaceConflictError
- buildNamespaceConflictError(topLevelRule: Rule): string
-
Parameters
Returns string
buildTokenNameError
- buildTokenNameError(options: { expectedPattern: RegExp; tokenType: TokenType }): any
-
Parameters
-
options: { expectedPattern: RegExp; tokenType: TokenType }
Returns any
buildTooManyAlternativesError
- buildTooManyAlternativesError(options: { alternation: Alternation; topLevelRule: Rule }): string
-
Parameters
Returns string
Implementing this interface enables customizing grammar validation errors when using custom APIs.