ebnf
Types
pub type Ebnf =
List(Production)
Parser errors
pub type ParseError {
UnterminatedTerminal(pos: Position)
UnterminatedComment(pos: Position)
EmptyTerminal(pos: Position)
UnexpectedCharacter(c: String, pos: Position)
UnexpectedToken(token: Token, expected: String)
UnexpectedEnd(expected: String)
DuplicateProductions(prods: List(String))
UnusedProductions(prods: List(String))
UndefinedProductions(prods: List(String))
}
Constructors
-
UnterminatedTerminal(pos: Position) -
UnterminatedComment(pos: Position) -
EmptyTerminal(pos: Position) -
UnexpectedCharacter(c: String, pos: Position) -
UnexpectedToken(token: Token, expected: String) -
UnexpectedEnd(expected: String) -
DuplicateProductions(prods: List(String)) -
UnusedProductions(prods: List(String)) -
UndefinedProductions(prods: List(String))
pub type Position {
Position(row: Int, col: Int)
}
Constructors
-
Position(row: Int, col: Int)
Values
pub fn parse(s: String) -> Result(List(Production), ParseError)