symantic-grammar-0.2.0.20170709: Library for symantic grammars.

Safe HaskellNone
LanguageHaskell2010

Language.Symantic.Grammar.Meta

Contents

Synopsis

Type Gram_Reader

class Gram_Reader st g where Source #

Minimal complete definition

askBefore, askAfter

Methods

askBefore :: g (st -> a) -> g a Source #

askAfter :: g (st -> a) -> g a Source #

Instances

Gram_Reader st EBNF Source # 

Methods

askBefore :: EBNF (st -> a) -> EBNF a Source #

askAfter :: EBNF (st -> a) -> EBNF a Source #

Gram_Reader st RuleEBNF Source # 

Methods

askBefore :: RuleEBNF (st -> a) -> RuleEBNF a Source #

askAfter :: RuleEBNF (st -> a) -> RuleEBNF a Source #

Gram_Reader st g => Gram_Reader st (CF g) Source # 

Methods

askBefore :: CF g (st -> a) -> CF g a Source #

askAfter :: CF g (st -> a) -> CF g a Source #

Gram_Reader st g => Gram_Reader st (Reg lr g) Source # 

Methods

askBefore :: Reg lr g (st -> a) -> Reg lr g a Source #

askAfter :: Reg lr g (st -> a) -> Reg lr g a Source #

Type Gram_State

class Gram_State st g where Source #

Minimal complete definition

stateBefore, stateAfter

Methods

stateBefore :: g (st -> (st, a)) -> g a Source #

stateAfter :: g (st -> (st, a)) -> g a Source #

getBefore :: g (st -> a) -> g a Source #

getAfter :: g (st -> a) -> g a Source #

put :: g (st, a) -> g a Source #

getBefore :: Functor g => g (st -> a) -> g a Source #

getAfter :: Functor g => g (st -> a) -> g a Source #

put :: Functor g => g (st, a) -> g a Source #

Instances

Gram_State st EBNF Source # 

Methods

stateBefore :: EBNF (st -> (st, a)) -> EBNF a Source #

stateAfter :: EBNF (st -> (st, a)) -> EBNF a Source #

getBefore :: EBNF (st -> a) -> EBNF a Source #

getAfter :: EBNF (st -> a) -> EBNF a Source #

put :: EBNF (st, a) -> EBNF a Source #

Gram_State st RuleEBNF Source # 

Methods

stateBefore :: RuleEBNF (st -> (st, a)) -> RuleEBNF a Source #

stateAfter :: RuleEBNF (st -> (st, a)) -> RuleEBNF a Source #

getBefore :: RuleEBNF (st -> a) -> RuleEBNF a Source #

getAfter :: RuleEBNF (st -> a) -> RuleEBNF a Source #

put :: RuleEBNF (st, a) -> RuleEBNF a Source #

Gram_State st g => Gram_State st (CF g) Source # 

Methods

stateBefore :: CF g (st -> (st, a)) -> CF g a Source #

stateAfter :: CF g (st -> (st, a)) -> CF g a Source #

getBefore :: CF g (st -> a) -> CF g a Source #

getAfter :: CF g (st -> a) -> CF g a Source #

put :: CF g (st, a) -> CF g a Source #

Gram_State st g => Gram_State st (Reg lr g) Source # 

Methods

stateBefore :: Reg lr g (st -> (st, a)) -> Reg lr g a Source #

stateAfter :: Reg lr g (st -> (st, a)) -> Reg lr g a Source #

getBefore :: Reg lr g (st -> a) -> Reg lr g a Source #

getAfter :: Reg lr g (st -> a) -> Reg lr g a Source #

put :: Reg lr g (st, a) -> Reg lr g a Source #

Class Gram_Error

class Gram_Error err g where Source #

Symantics for handling errors at the semantic level (not the syntaxic one).

Minimal complete definition

catch

Methods

catch :: g (Either err a) -> g a Source #

Instances

Gram_Error err EBNF Source # 

Methods

catch :: EBNF (Either err a) -> EBNF a Source #

Gram_Error err RuleEBNF Source # 

Methods

catch :: RuleEBNF (Either err a) -> RuleEBNF a Source #

Gram_Error err g => Gram_Error err (CF g) Source # 

Methods

catch :: CF g (Either err a) -> CF g a Source #

Gram_Error err g => Gram_Error err (Reg lr g) Source # 

Methods

catch :: Reg lr g (Either err a) -> Reg lr g a Source #

Class Gram_Source

class (Gram_Reader (Source_Input src) g, SourceInj (Span (Source_Input src)) src) => Gram_Source src g where Source #

Methods

source :: Functor g => g (src -> a) -> g a Source #

Instances

(Gram_Reader (Source_Input src) g, SourceInj (Span (Source_Input src)) src) => Gram_Source src g Source # 

Methods

source :: Functor g => g (src -> a) -> g a Source #