little-earley-0.2.0.0: Simple implementation of Earley parsing
Safe HaskellSafe-Inferred
LanguageHaskell2010

Little.Earley.Internal.Render

Synopsis

Render parse trees

data Box a Source #

Constructors

Box 

Fields

Instances

Instances details
Eq a => Eq (Box a) Source # 
Instance details

Defined in Little.Earley.Internal.Render

Methods

(==) :: Box a -> Box a -> Bool #

(/=) :: Box a -> Box a -> Bool #

Show a => Show (Box a) Source # 
Instance details

Defined in Little.Earley.Internal.Render

Methods

showsPrec :: Int -> Box a -> ShowS #

show :: Box a -> String #

showList :: [Box a] -> ShowS #

data PicTree Source #

Instances

Instances details
Eq PicTree Source # 
Instance details

Defined in Little.Earley.Internal.Render

Methods

(==) :: PicTree -> PicTree -> Bool #

(/=) :: PicTree -> PicTree -> Bool #

Show PicTree Source # 
Instance details

Defined in Little.Earley.Internal.Render

drawTree :: (n -> String) -> (c -> String) -> Tree n t c -> [String] Source #

Draw a tree in the terminal.

pasteCenter :: [a] -> [a] -> [a] Source #

center_ :: a -> a -> Int -> [a] -> [a] Source #

formatTree :: (n -> String) -> (c -> String) -> Tree n t c -> Box PicTree Source #

prettyTree :: (PrettyPrint n, PrettyPrint c) => Tree n t c -> [String] Source #

drawTree using prettyPrint to show symbols.