summaryrefslogtreecommitdiff
path: root/src/GF/Source/SkelGF.hs
diff options
context:
space:
mode:
authoraarne <aarne@cs.chalmers.se>2008-03-15 14:53:42 +0000
committeraarne <aarne@cs.chalmers.se>2008-03-15 14:53:42 +0000
commitc73bc4f996b3259fa162d7dd11a23224053ceeae (patch)
treedd3406d9f06beefedb214feffabf9d119d8383ce /src/GF/Source/SkelGF.hs
parenteff08dfe88d677453a889b128f05a01935bf4e10 (diff)
switched to unmodified BNFC-generated components
Diffstat (limited to 'src/GF/Source/SkelGF.hs')
-rw-r--r--src/GF/Source/SkelGF.hs155
1 files changed, 83 insertions, 72 deletions
diff --git a/src/GF/Source/SkelGF.hs b/src/GF/Source/SkelGF.hs
index 5c903523b..3bd192f9d 100644
--- a/src/GF/Source/SkelGF.hs
+++ b/src/GF/Source/SkelGF.hs
@@ -3,24 +3,22 @@ module GF.Source.SkelGF where
-- Haskell module generated by the BNF converter
import GF.Source.AbsGF
-import GF.Infra.Ident
-import GF.Data.ErrM
-
+import GF.Source.ErrM
type Result = Err String
failure :: Show a => a -> Result
failure x = Bad $ "Undefined case: " ++ show x
-transIdent :: Ident -> Result
-transIdent x = case x of
- IC str -> failure x
-
-
transLString :: LString -> Result
transLString x = case x of
LString str -> failure x
+transPIdent :: PIdent -> Result
+transPIdent x = case x of
+ PIdent str -> failure x
+
+
transGrammar :: Grammar -> Result
transGrammar x = case x of
Gr moddefs -> failure x
@@ -28,18 +26,18 @@ transGrammar x = case x of
transModDef :: ModDef -> Result
transModDef x = case x of
- MMain id0 id concspecs -> failure x
+ MMain pident0 pident concspecs -> failure x
MModule complmod modtype modbody -> failure x
transConcSpec :: ConcSpec -> Result
transConcSpec x = case x of
- ConcSpec id concexp -> failure x
+ ConcSpec pident concexp -> failure x
transConcExp :: ConcExp -> Result
transConcExp x = case x of
- ConcExp id transfers -> failure x
+ ConcExp pident transfers -> failure x
transTransfer :: Transfer -> Result
@@ -50,26 +48,29 @@ transTransfer x = case x of
transModType :: ModType -> Result
transModType x = case x of
- MTAbstract id -> failure x
- MTResource id -> failure x
- MTInterface id -> failure x
- MTConcrete id0 id -> failure x
- MTInstance id0 id -> failure x
- MTTransfer id open0 open -> failure x
+ MTAbstract pident -> failure x
+ MTResource pident -> failure x
+ MTInterface pident -> failure x
+ MTConcrete pident0 pident -> failure x
+ MTInstance pident0 pident -> failure x
+ MTTransfer pident open0 open -> failure x
transModBody :: ModBody -> Result
transModBody x = case x of
MBody extend opens topdefs -> failure x
- MWith id opens -> failure x
- MWithE ids id opens -> failure x
- MReuse id -> failure x
+ MNoBody includeds -> failure x
+ MWith included opens -> failure x
+ MWithBody included opens0 opens topdefs -> failure x
+ MWithE includeds included opens -> failure x
+ MWithEBody includeds included opens0 opens topdefs -> failure x
+ MReuse pident -> failure x
MUnion includeds -> failure x
transExtend :: Extend -> Result
transExtend x = case x of
- Ext ids -> failure x
+ Ext includeds -> failure x
NoExt -> failure x
@@ -81,9 +82,9 @@ transOpens x = case x of
transOpen :: Open -> Result
transOpen x = case x of
- OName id -> failure x
- OQualQO qualopen id -> failure x
- OQual qualopen id0 id -> failure x
+ OName pident -> failure x
+ OQualQO qualopen pident -> failure x
+ OQual qualopen pident0 pident -> failure x
transComplMod :: ComplMod -> Result
@@ -101,8 +102,9 @@ transQualOpen x = case x of
transIncluded :: Included -> Result
transIncluded x = case x of
- IAll id -> failure x
- ISome id ids -> failure x
+ IAll pident -> failure x
+ ISome pident pidents -> failure x
+ IMinus pident pidents -> failure x
transDef :: Def -> Result
@@ -132,44 +134,44 @@ transTopDef x = case x of
DefPrintOld printdefs -> failure x
DefLintype defs -> failure x
DefPattern defs -> failure x
- DefPackage id topdefs -> failure x
+ DefPackage pident topdefs -> failure x
DefVars defs -> failure x
- DefTokenizer id -> failure x
+ DefTokenizer pident -> failure x
transCatDef :: CatDef -> Result
transCatDef x = case x of
- SimpleCatDef id ddecls -> failure x
- ListCatDef id ddecls -> failure x
- ListSizeCatDef id ddecls n -> failure x
+ SimpleCatDef pident ddecls -> failure x
+ ListCatDef pident ddecls -> failure x
+ ListSizeCatDef pident ddecls n -> failure x
transFunDef :: FunDef -> Result
transFunDef x = case x of
- FunDef ids exp -> failure x
+ FunDef pidents exp -> failure x
transDataDef :: DataDef -> Result
transDataDef x = case x of
- DataDef id dataconstrs -> failure x
+ DataDef pident dataconstrs -> failure x
transDataConstr :: DataConstr -> Result
transDataConstr x = case x of
- DataId id -> failure x
- DataQId id0 id -> failure x
+ DataId pident -> failure x
+ DataQId pident0 pident -> failure x
transParDef :: ParDef -> Result
transParDef x = case x of
- ParDefDir id parconstrs -> failure x
- ParDefIndir id0 id -> failure x
- ParDefAbs id -> failure x
+ ParDefDir pident parconstrs -> failure x
+ ParDefIndir pident0 pident -> failure x
+ ParDefAbs pident -> failure x
transParConstr :: ParConstr -> Result
transParConstr x = case x of
- ParConstr id ddecls -> failure x
+ ParConstr pident ddecls -> failure x
transPrintDef :: PrintDef -> Result
@@ -179,42 +181,43 @@ transPrintDef x = case x of
transFlagDef :: FlagDef -> Result
transFlagDef x = case x of
- FlagDef id0 id -> failure x
+ FlagDef pident0 pident -> failure x
transName :: Name -> Result
transName x = case x of
- IdentName id -> failure x
- ListName id -> failure x
+ IdentName pident -> failure x
+ ListName pident -> failure x
transLocDef :: LocDef -> Result
transLocDef x = case x of
- LDDecl ids exp -> failure x
- LDDef ids exp -> failure x
- LDFull ids exp0 exp -> failure x
+ LDDecl pidents exp -> failure x
+ LDDef pidents exp -> failure x
+ LDFull pidents exp0 exp -> failure x
transExp :: Exp -> Result
transExp x = case x of
- EIdent id -> failure x
- EConstr id -> failure x
- ECons id -> failure x
+ EIdent pident -> failure x
+ EConstr pident -> failure x
+ ECons pident -> failure x
ESort sort -> failure x
EString str -> failure x
EInt n -> failure x
+ EFloat d -> failure x
EMeta -> failure x
EEmpty -> failure x
EData -> failure x
- EList id exps -> failure x
+ EList pident exps -> failure x
EStrings str -> failure x
ERecord locdefs -> failure x
ETuple tuplecomps -> failure x
- EIndir id -> failure x
+ EIndir pident -> failure x
ETyped exp0 exp -> failure x
EProj exp label -> failure x
- EQConstr id0 id -> failure x
- EQCons id0 id -> failure x
+ EQConstr pident0 pident -> failure x
+ EQCons pident0 pident -> failure x
EApp exp0 exp -> failure x
ETable cases -> failure x
ETTable exp cases -> failure x
@@ -223,22 +226,25 @@ transExp x = case x of
EVariants exps -> failure x
EPre exp alterns -> failure x
EStrs exps -> failure x
- EConAt id exp -> failure x
+ EConAt pident exp -> failure x
+ EPatt patt -> failure x
+ EPattType exp -> failure x
ESelect exp0 exp -> failure x
ETupTyp exp0 exp -> failure x
EExtend exp0 exp -> failure x
+ EGlue exp0 exp -> failure x
+ EConcat exp0 exp -> failure x
EAbstr binds exp -> failure x
ECTable binds exp -> failure x
EProd decl exp -> failure x
ETType exp0 exp -> failure x
- EConcat exp0 exp -> failure x
- EGlue exp0 exp -> failure x
ELet locdefs exp -> failure x
ELetb locdefs exp -> failure x
EWhere exp locdefs -> failure x
EEqs equations -> failure x
+ EExample exp str -> failure x
ELString lstring -> failure x
- ELin id -> failure x
+ ELin pident -> failure x
transExps :: Exps -> Result
@@ -249,26 +255,36 @@ transExps x = case x of
transPatt :: Patt -> Result
transPatt x = case x of
+ PChar -> failure x
+ PChars str -> failure x
+ PMacro pident -> failure x
+ PM pident0 pident -> failure x
PW -> failure x
- PV id -> failure x
- PCon id -> failure x
- PQ id0 id -> failure x
+ PV pident -> failure x
+ PCon pident -> failure x
+ PQ pident0 pident -> failure x
PInt n -> failure x
+ PFloat d -> failure x
PStr str -> failure x
PR pattasss -> failure x
PTup patttuplecomps -> failure x
- PC id patts -> failure x
- PQC id0 id patts -> failure x
+ PC pident patts -> failure x
+ PQC pident0 pident patts -> failure x
+ PDisj patt0 patt -> failure x
+ PSeq patt0 patt -> failure x
+ PRep patt -> failure x
+ PAs pident patt -> failure x
+ PNeg patt -> failure x
transPattAss :: PattAss -> Result
transPattAss x = case x of
- PA ids patt -> failure x
+ PA pidents patt -> failure x
transLabel :: Label -> Result
transLabel x = case x of
- LIdent id -> failure x
+ LIdent pident -> failure x
LVar n -> failure x
@@ -281,14 +297,9 @@ transSort x = case x of
Sort_Strs -> failure x
-transPattAlt :: PattAlt -> Result
-transPattAlt x = case x of
- AltP patt -> failure x
-
-
transBind :: Bind -> Result
transBind x = case x of
- BIdent id -> failure x
+ BIdent pident -> failure x
BWild -> failure x
@@ -310,7 +321,7 @@ transPattTupleComp x = case x of
transCase :: Case -> Result
transCase x = case x of
- Case pattalts exp -> failure x
+ Case patt exp -> failure x
transEquation :: Equation -> Result
@@ -343,11 +354,11 @@ transInclude x = case x of
transFileName :: FileName -> Result
transFileName x = case x of
FString str -> failure x
- FIdent id -> failure x
+ FIdent pident -> failure x
FSlash filename -> failure x
FDot filename -> failure x
FMinus filename -> failure x
- FAddId id filename -> failure x
+ FAddId pident filename -> failure x