Copyright | (c) Karl Cronburg 2018 |
---|---|
License | BSD3 |
Maintainer | karl@cs.tufts.edu |
Stability | experimental |
Portability | POSIX |
Safe Haskell | None |
Language | Haskell2010 |
Text.ANTLR.Allstar
Description
This module contains the glue code for hooking Sam's
ParserGenerator
implementation into the rest of
this package.
Synopsis
- parse :: (Ord nts, Ord (Label t), Token t, Show nts, Show (Label t), Show t) => [t] -> GrammarSymbol nts (Label t) -> Set (ATNEdge nts (Label t)) -> Bool -> Either String (AST nts t)
- atnOf :: (Ord nt, Ord t, Hashable nt, Hashable t) => Grammar s nt t -> ATNEnv nt t
- class Token t where
- data GrammarSymbol nt t
- type ATNEnv nt t = Set (ATNEdge nt t)
Documentation
parse :: (Ord nts, Ord (Label t), Token t, Show nts, Show (Label t), Show t) => [t] -> GrammarSymbol nts (Label t) -> Set (ATNEdge nts (Label t)) -> Bool -> Either String (AST nts t) Source #
Entrypoint to the ALL(*) parsing algorithm.
atnOf :: (Ord nt, Ord t, Hashable nt, Hashable t) => Grammar s nt t -> ATNEnv nt t Source #
Go from an antlr-haskell Grammar to an Allstar ATNEnv. ALL(*) does not current support predicates and mutators.
Input sequence type
data GrammarSymbol nt t Source #
Grammar symbol types