Skip to content

slasser/AllStar

Repository files navigation

Haskell parser generator based on the ALL(*) parsing algorithm.

sample grammar

S -> Ac | Ad

A -> aA | b

Input/output examples

*Test.AllStarTests> parse ['a', 'b', 'c'] (NT 'S') atnEnv
(Just True, Node 'S' [Node 'A' [Leaf 'a', Node 'A' [Leaf 'b']], Leaf 'c'])
*Test.AllStarTests> parse ['b', 'd'] (NT 'S') atnEnv
(Just True, Node 'S' [Node 'A' [Leaf 'b'], Leaf 'd'])
*Test.AllStarTests> parse ['a', 'a', 'a', 'a', 'b', 'c'] (NT 'S') atnEnv
(Just True, Node 'S' [Node 'A' [Leaf 'a', Node 'A' [Leaf 'a', Node 'A' [Leaf 'a', Node 'A' [Leaf 'a', Node 'A' [Leaf 'b']]]]], Leaf 'c'])

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published