| Copyright | (C) 2026 - Eitan Chatav |
|---|---|
| License | BSD-style (see the file LICENSE) |
| Maintainer | Eitan Chatav <eitan.chatav@gmail.com> |
| Stability | provisional |
| Portability | non-portable |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
Control.Lens.Grammar.Symbol
Contents
Description
Synopsis
- class TerminalSymbol token s | s -> token where
- terminal :: [token] -> s
- class NonTerminalSymbol s where
- nonTerminal :: String -> s
Symbol
class TerminalSymbol token s | s -> token where Source #
A terminal symbol in a grammar.
Minimal complete definition
Nothing
Methods
Instances
| TerminalSymbol Char RegBnf Source # | |
| TerminalSymbol Char RegString Source # | |
| (Ord rule, TerminalSymbol token rule) => TerminalSymbol token (Bnf rule) Source # | |
Defined in Control.Lens.Grammar.BackusNaur | |
| TerminalSymbol token (RegEx token) Source # | |
Defined in Control.Lens.Grammar.Kleene | |
| TerminalSymbol token k => TerminalSymbol token (Grammor k a b) Source # | |
Defined in Data.Profunctor.Grammar | |
| (Categorized a, a ~ Item s, IsList s, Cons s s a a, Snoc s s a a, Filterable m, Alternative m, Monad m) => TerminalSymbol a (Parsor s m () ()) Source # | |
Defined in Data.Profunctor.Grammar | |
| (Categorized a, a ~ Item s, IsList s, Cons s s a a, Filterable m, Alternative m, Monad m) => TerminalSymbol a (Printor s m () ()) Source # | |
Defined in Data.Profunctor.Grammar | |
class NonTerminalSymbol s where Source #
A nonTerminal symbol in a grammar.
Methods
nonTerminal :: String -> s Source #
Instances
| NonTerminalSymbol RegBnf Source # | |
Defined in Control.Lens.Grammar Methods nonTerminal :: String -> RegBnf Source # | |
| NonTerminalSymbol RegString Source # | |
Defined in Control.Lens.Grammar Methods nonTerminal :: String -> RegString Source # | |
| (Ord rule, NonTerminalSymbol rule) => NonTerminalSymbol (Bnf rule) Source # | |
Defined in Control.Lens.Grammar.BackusNaur Methods nonTerminal :: String -> Bnf rule Source # | |
| NonTerminalSymbol (RegEx token) Source # | |
Defined in Control.Lens.Grammar.Kleene Methods nonTerminal :: String -> RegEx token Source # | |