switched to unmodified BNFC-generated components

This commit is contained in:
aarne
2008-03-15 14:53:42 +00:00
parent eff08dfe88
commit c73bc4f996
13 changed files with 860 additions and 763 deletions

View File

@@ -1,26 +1,24 @@
module GF.Source.AbsGF where --H
module GF.Source.AbsGF where
import GF.Infra.Ident --H
-- Haskell module generated by the BNF converter
-- Haskell module generated by the BNF converter, except --H
-- newtype Ident = Ident String deriving (Eq,Ord,Show) --H
newtype LString = LString String deriving (Eq,Ord,Show)
newtype PIdent = PIdent ((Int,Int),String) deriving (Eq,Ord,Show)
data Grammar =
Gr [ModDef]
deriving (Eq,Ord,Show)
data ModDef =
MMain Ident Ident [ConcSpec]
MMain PIdent PIdent [ConcSpec]
| MModule ComplMod ModType ModBody
deriving (Eq,Ord,Show)
data ConcSpec =
ConcSpec Ident ConcExp
ConcSpec PIdent ConcExp
deriving (Eq,Ord,Show)
data ConcExp =
ConcExp Ident [Transfer]
ConcExp PIdent [Transfer]
deriving (Eq,Ord,Show)
data Transfer =
@@ -29,22 +27,22 @@ data Transfer =
deriving (Eq,Ord,Show)
data ModType =
MTAbstract Ident
| MTResource Ident
| MTInterface Ident
| MTConcrete Ident Ident
| MTInstance Ident Ident
| MTTransfer Ident Open Open
MTAbstract PIdent
| MTResource PIdent
| MTInterface PIdent
| MTConcrete PIdent PIdent
| MTInstance PIdent PIdent
| MTTransfer PIdent Open Open
deriving (Eq,Ord,Show)
data ModBody =
MNoBody [Included]
| MWithBody Included [Open] Opens [TopDef]
| MWithEBody [Included] Included [Open] Opens [TopDef]
| MBody Extend Opens [TopDef]
MBody Extend Opens [TopDef]
| MNoBody [Included]
| MWith Included [Open]
| MWithBody Included [Open] Opens [TopDef]
| MWithE [Included] Included [Open]
| MReuse Ident
| MWithEBody [Included] Included [Open] Opens [TopDef]
| MReuse PIdent
| MUnion [Included]
deriving (Eq,Ord,Show)
@@ -59,9 +57,9 @@ data Opens =
deriving (Eq,Ord,Show)
data Open =
OName Ident
| OQualQO QualOpen Ident
| OQual QualOpen Ident Ident
OName PIdent
| OQualQO QualOpen PIdent
| OQual QualOpen PIdent PIdent
deriving (Eq,Ord,Show)
data ComplMod =
@@ -76,9 +74,9 @@ data QualOpen =
deriving (Eq,Ord,Show)
data Included =
IAll Ident
| ISome Ident [Ident]
| IMinus Ident [Ident]
IAll PIdent
| ISome PIdent [PIdent]
| IMinus PIdent [PIdent]
deriving (Eq,Ord,Show)
data Def =
@@ -106,38 +104,38 @@ data TopDef =
| DefPrintOld [PrintDef]
| DefLintype [Def]
| DefPattern [Def]
| DefPackage Ident [TopDef]
| DefPackage PIdent [TopDef]
| DefVars [Def]
| DefTokenizer Ident
| DefTokenizer PIdent
deriving (Eq,Ord,Show)
data CatDef =
SimpleCatDef Ident [DDecl]
| ListCatDef Ident [DDecl]
| ListSizeCatDef Ident [DDecl] Integer
SimpleCatDef PIdent [DDecl]
| ListCatDef PIdent [DDecl]
| ListSizeCatDef PIdent [DDecl] Integer
deriving (Eq,Ord,Show)
data FunDef =
FunDef [Ident] Exp
FunDef [PIdent] Exp
deriving (Eq,Ord,Show)
data DataDef =
DataDef Ident [DataConstr]
DataDef PIdent [DataConstr]
deriving (Eq,Ord,Show)
data DataConstr =
DataId Ident
| DataQId Ident Ident
DataId PIdent
| DataQId PIdent PIdent
deriving (Eq,Ord,Show)
data ParDef =
ParDefDir Ident [ParConstr]
| ParDefIndir Ident Ident
| ParDefAbs Ident
ParDefDir PIdent [ParConstr]
| ParDefIndir PIdent PIdent
| ParDefAbs PIdent
deriving (Eq,Ord,Show)
data ParConstr =
ParConstr Ident [DDecl]
ParConstr PIdent [DDecl]
deriving (Eq,Ord,Show)
data PrintDef =
@@ -145,24 +143,24 @@ data PrintDef =
deriving (Eq,Ord,Show)
data FlagDef =
FlagDef Ident Ident
FlagDef PIdent PIdent
deriving (Eq,Ord,Show)
data Name =
IdentName Ident
| ListName Ident
IdentName PIdent
| ListName PIdent
deriving (Eq,Ord,Show)
data LocDef =
LDDecl [Ident] Exp
| LDDef [Ident] Exp
| LDFull [Ident] Exp Exp
LDDecl [PIdent] Exp
| LDDef [PIdent] Exp
| LDFull [PIdent] Exp Exp
deriving (Eq,Ord,Show)
data Exp =
EIdent Ident
| EConstr Ident
| ECons Ident
EIdent PIdent
| EConstr PIdent
| ECons PIdent
| ESort Sort
| EString String
| EInt Integer
@@ -170,15 +168,15 @@ data Exp =
| EMeta
| EEmpty
| EData
| EList Ident Exps
| EList PIdent Exps
| EStrings String
| ERecord [LocDef]
| ETuple [TupleComp]
| EIndir Ident
| EIndir PIdent
| ETyped Exp Exp
| EProj Exp Label
| EQConstr Ident Ident
| EQCons Ident Ident
| EQConstr PIdent PIdent
| EQCons PIdent PIdent
| EApp Exp Exp
| ETable [Case]
| ETTable Exp [Case]
@@ -187,7 +185,9 @@ data Exp =
| EVariants [Exp]
| EPre Exp [Altern]
| EStrs [Exp]
| EConAt Ident Exp
| EConAt PIdent Exp
| EPatt Patt
| EPattType Exp
| ESelect Exp Exp
| ETupTyp Exp Exp
| EExtend Exp Exp
@@ -203,7 +203,7 @@ data Exp =
| EEqs [Equation]
| EExample Exp String
| ELString LString
| ELin Ident
| ELin PIdent
deriving (Eq,Ord,Show)
data Exps =
@@ -212,30 +212,34 @@ data Exps =
deriving (Eq,Ord,Show)
data Patt =
PW
| PV Ident
| PCon Ident
| PQ Ident Ident
PChar
| PChars String
| PMacro PIdent
| PM PIdent PIdent
| PW
| PV PIdent
| PCon PIdent
| PQ PIdent PIdent
| PInt Integer
| PFloat Double
| PStr String
| PR [PattAss]
| PTup [PattTupleComp]
| PC Ident [Patt]
| PQC Ident Ident [Patt]
| PC PIdent [Patt]
| PQC PIdent PIdent [Patt]
| PDisj Patt Patt
| PSeq Patt Patt
| PRep Patt
| PAs Ident Patt
| PAs PIdent Patt
| PNeg Patt
deriving (Eq,Ord,Show)
data PattAss =
PA [Ident] Patt
PA [PIdent] Patt
deriving (Eq,Ord,Show)
data Label =
LIdent Ident
LIdent PIdent
| LVar Integer
deriving (Eq,Ord,Show)
@@ -248,7 +252,7 @@ data Sort =
deriving (Eq,Ord,Show)
data Bind =
BIdent Ident
BIdent PIdent
| BWild
deriving (Eq,Ord,Show)
@@ -293,10 +297,10 @@ data Include =
data FileName =
FString String
| FIdent Ident
| FIdent PIdent
| FSlash FileName
| FDot FileName
| FMinus FileName
| FAddId Ident FileName
| FAddId PIdent FileName
deriving (Eq,Ord,Show)