Enum parol::parser::errors::ParolParserError
source · pub enum ParolParserError {
UnknownScanner {
context: String,
name: String,
input: PathBuf,
token: Location,
},
EmptyGroup {
context: String,
input: PathBuf,
start: Location,
end: Location,
},
EmptyOptional {
context: String,
input: PathBuf,
start: Location,
end: Location,
},
EmptyRepetition {
context: String,
input: PathBuf,
start: Location,
end: Location,
},
ConflictingTokenAliases {
first_alias: String,
second_alias: String,
expanded: String,
input: PathBuf,
first: Location,
second: Location,
},
EmptyScanners {
empty_scanners: Vec<String>,
},
UnsupportedGrammarType {
grammar_type: String,
input: PathBuf,
token: Location,
},
UnsupportedFeature {
feature: String,
hint: String,
input: PathBuf,
token: Location,
},
InvalidTokenInTransition {
context: String,
token: String,
input: PathBuf,
location: Location,
},
TokenIsNotInScanner {
context: String,
scanner: String,
token: String,
input: PathBuf,
location: Location,
},
MixedScannerSwitching {
context: String,
input: PathBuf,
location: Location,
},
}
Expand description
Error types used by the crate::parser::ParolGrammar’s semantic actions
Variants§
UnknownScanner
Undeclared scanner found. Please declare a scanner via %scanner name {{…}}
Fields
EmptyGroup
Empty Groups () are not allowed.
Fields
EmptyOptional
Empty Optionals [] are not allowed.
Fields
EmptyRepetition
Empty Repetitions {{}} are not allowed.
Fields
ConflictingTokenAliases
Multiple token aliases that expand to the same text will produce a terminal conflict.
Fields
EmptyScanners
Empty Scanner states are not allowed.
UnsupportedGrammarType
Unsupported grammar type
UnsupportedFeature
Unsupported feature
Fields
InvalidTokenInTransition
Invalid token in transition, e.g. a token that is not defined in the grammar is used in a transition. Use a primary non-terminal for the token.
Fields
TokenIsNotInScanner
The token that is used to initiate a transition is not defined in this scanner.
Fields
MixedScannerSwitching
Mixed scanner switching is not allowed - use either parser-based or scanner-based switching. Parser-based switching is done via the %sc, %push and %pop directives productions. Scanner-based switching is done via the %on directive in the header of the grammar file.