language-oberon-0.1: Parser and pretty-printer for the Oberon programming language

Safe HaskellNone
LanguageHaskell2010

Language.Oberon.Grammar

Description

Oberon grammar adapted from http://www.ethoberon.ethz.ch/EBNF.html Extracted from the book Programmieren in Oberon - Das neue Pascal by N. Wirth and M. Reiser and translated by J. Templ.

Synopsis

Documentation

data OberonGrammar f p Source #

All the productions of the Oberon grammar

Constructors

OberonGrammar 

Fields

Instances

Lexical (OberonGrammar f) Source # 
Traversable * (OberonGrammar f) Source # 

Methods

traverse :: Applicative m => (forall (a :: OberonGrammar f). p a -> m (q a)) -> g p -> m (g q) #

sequence :: Applicative m => g (Compose * (OberonGrammar f) m p) -> m (g p) #

Apply * (OberonGrammar f) Source # 

Methods

(<*>) :: g ((OberonGrammar f ~> p) q) -> g p -> g q #

liftA2 :: (forall (a :: OberonGrammar f). p a -> q a -> r a) -> g p -> g q -> g r #

liftA3 :: (forall (a :: OberonGrammar f). p a -> q a -> r a -> s a) -> g p -> g q -> g r -> g s #

Functor * (OberonGrammar f) Source # 

Methods

(<$>) :: (forall (a :: OberonGrammar f). p a -> q a) -> g p -> g q #

Foldable * (OberonGrammar f) Source # 

Methods

foldMap :: Monoid m => (forall (a :: OberonGrammar f). p a -> m) -> g p -> m #

Applicative * (OberonGrammar f) Source # 

Methods

pure :: (forall (a :: OberonGrammar f). f a) -> g f #

Distributive * (OberonGrammar f) Source # 

Methods

collect :: Functor f1 => (a -> g f2) -> f1 a -> g (Compose * (OberonGrammar f) f1 f2) #

distribute :: Functor f1 => f1 (g f2) -> g (Compose * (OberonGrammar f) f1 f2) #

cotraverse :: Functor m => (forall (a :: OberonGrammar f). m (p a) -> q a) -> m (g p) -> g q #

DistributiveTraversable * (OberonGrammar f) Source # 

Methods

collectTraversable :: Traversable f1 => (a -> g f2) -> f1 a -> g (Compose * (OberonGrammar f) f1 f2) #

distributeTraversable :: Traversable f1 => f1 (g f2) -> g (Compose * (OberonGrammar f) f1 f2) #

cotraverseTraversable :: Traversable f1 => (forall (x :: OberonGrammar f). f1 (f2 x) -> f x) -> f1 (g f2) -> g f #

type LexicalConstraint p (OberonGrammar f) s Source # 
type LexicalConstraint p (OberonGrammar f) s = ((~) * s Text, (~) (((* -> *) -> *) -> * -> * -> *) p Parser)

oberon2Grammar :: Grammar (OberonGrammar Ambiguous) Parser Text Source #

Grammar of an Oberon-2 module

oberonDefinitionGrammar :: Grammar (OberonGrammar Ambiguous) Parser Text Source #

Grammar of an Oberon definition module

oberon2DefinitionGrammar :: Grammar (OberonGrammar Ambiguous) Parser Text Source #

Grammar of an Oberon-2 definition module