Safe Haskell | None |
---|---|
Language | Haskell2010 |
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
- data OberonGrammar f p = OberonGrammar {
- module_prod :: p (Module f)
- ident :: p Ident
- letter :: p Text
- digit :: p Text
- importList :: p [Import]
- import_prod :: p Import
- declarationSequence :: p [Declaration f]
- constantDeclaration :: p (Declaration f)
- identdef :: p IdentDef
- constExpression :: p (Expression f)
- expression :: p (Expression f)
- simpleExpression :: p (Expression f)
- term :: p (Expression f)
- factor :: p (Expression f)
- number :: p (Expression f)
- integer :: p (Expression f)
- hexDigit :: p Text
- real :: p (Expression f)
- scaleFactor :: p Text
- charConstant :: p (Expression f)
- string_prod :: p Text
- set :: p (Expression f)
- element :: p (Element f)
- designator :: p (Designator f)
- expList :: p (NonEmpty (Expression f))
- actualParameters :: p [Expression f]
- mulOperator :: p (BinOp f)
- addOperator :: p (BinOp f)
- relation :: p RelOp
- typeDeclaration :: p (Declaration f)
- type_prod :: p (Type f)
- qualident :: p QualIdent
- arrayType :: p (Type f)
- length :: p (Expression f)
- recordType :: p (Type f)
- baseType :: p QualIdent
- fieldListSequence :: p (FieldListSequence f)
- fieldList :: p (FieldList f)
- identList :: p IdentList
- pointerType :: p (Type f)
- procedureType :: p (Type f)
- variableDeclaration :: p (Declaration f)
- procedureDeclaration :: p (Declaration f)
- procedureHeading :: p (ProcedureHeading f)
- formalParameters :: p (FormalParameters f)
- fPSection :: p (FPSection f)
- formalType :: p (Type f)
- procedureBody :: p (ProcedureBody f)
- forwardDeclaration :: p (Declaration f)
- statementSequence :: p (NonEmpty (Ambiguous (Statement f)))
- statement :: p (Statement f)
- assignment :: p (Statement f)
- procedureCall :: p (Statement f)
- ifStatement :: p (Statement f)
- caseStatement :: p (Statement f)
- case_prod :: p (Case f)
- caseLabelList :: p (NonEmpty (CaseLabels f))
- caseLabels :: p (CaseLabels f)
- whileStatement :: p (Statement f)
- repeatStatement :: p (Statement f)
- forStatement :: p (Statement f)
- loopStatement :: p (Statement f)
- withStatement :: p (Statement f)
- oberonGrammar :: Grammar (OberonGrammar Ambiguous) Parser Text
- oberon2Grammar :: Grammar (OberonGrammar Ambiguous) Parser Text
- oberonDefinitionGrammar :: Grammar (OberonGrammar Ambiguous) Parser Text
- oberon2DefinitionGrammar :: Grammar (OberonGrammar Ambiguous) Parser Text
Documentation
data OberonGrammar f p Source #
All the productions of the Oberon grammar
Instances
oberonGrammar :: Grammar (OberonGrammar Ambiguous) Parser Text Source #
Grammar of an Oberon module
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