pub enum Code {
Show 27 variants
UnexpectedCharacter,
BadString,
UnterminatedComment,
NoModule,
MissingModuleEnd,
UnexpectedToken,
MissingExpression,
PrecedenceConflict,
MissingOperator,
MisplacedOperator,
JunctionIndentation,
StepLevel,
StepNumberMisuse,
UnexpectedProof,
ProofTooDeep,
BadLabel,
LabelChangesParse,
TimesAsArgument,
SetMapWithIn,
AtInExcept,
BadFairness,
NewWithArguments,
BadStructuralSelector,
NestingTooDeep,
InputTooLarge,
ModuleNameMismatch,
InvalidUtf8,
}Expand description
A stable diagnostic code.
Variants§
UnexpectedCharacter
DIVE-S0001: a character that cannot start any token.
BadString
DIVE-S0002: a string literal with a bad escape or no closing quote.
UnterminatedComment
DIVE-S0003: a block comment still open at end of input.
NoModule
DIVE-S0004: no ---- MODULE header in the input.
MissingModuleEnd
DIVE-S0005: end of input before the module’s closing ====.
UnexpectedToken
DIVE-S0010: a token the grammar does not allow here.
MissingExpression
DIVE-S0011: an expression was expected but is missing.
PrecedenceConflict
DIVE-S0012: operators of overlapping precedence without parentheses.
MissingOperator
DIVE-S0013: two expressions with no operator between them.
MisplacedOperator
DIVE-S0014: a prefix, infix or postfix operator in a position it cannot take.
JunctionIndentation
DIVE-S0015: a token inside a /\ or \/ list item is not right of its bullet.
StepLevel
DIVE-S0020: a proof step number has the wrong level.
StepNumberMisuse
DIVE-S0021: a step number used outside a proof, or <+> in an expression.
UnexpectedProof
DIVE-S0022: a proof attached to a step that cannot take one.
ProofTooDeep
DIVE-S0023: proofs nested more than 100 levels (SANY’s limit).
BadLabel
DIVE-S0030: :: that does not follow a label.
LabelChangesParse
DIVE-S0031: a label whose removal would change how the expression parses.
TimesAsArgument
DIVE-S0032: \X (or \times) used as an operator argument.
SetMapWithIn
DIVE-S0033: the form {a \in b : c \in d}.
AtInExcept
DIVE-S0034: @ used as a field name in !.@.
BadFairness
DIVE-S0035: an ill-structured WF_/SF_ expression.
NewWithArguments
DIVE-S0036: NEW declares a symbol with arguments before \in.
BadStructuralSelector
DIVE-S0037: a decimal number used as a structural selector (Op!1.2).
NestingTooDeep
DIVE-S0040: nesting deeper than this parser supports.
InputTooLarge
DIVE-S0041: input larger than 4 GiB.
ModuleNameMismatch
DIVE-S0006: the top-level module’s name differs from the file name.
InvalidUtf8
DIVE-S0007 (warning): the file is not valid UTF-8; invalid bytes were
read as U+FFFD, as SANY’s UTF-8 reader does.