forked from GitHub/gf-core
resource specialized to present tense ; preprocessor flag
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
--# -path=.:compiled:prelude:resource-1.0/swadesh
|
||||
--# -path=.:resource-1.0/present:prelude:compiled
|
||||
|
||||
concrete BronzeageEng of Bronzeage = CatEng, SwadeshEng ** BronzeageI with
|
||||
(Lang = LangEng),
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
--# -path=.:compiled:resource-1.0/swadesh
|
||||
--# -path=.:resource-1.0/present:prelude
|
||||
|
||||
concrete BronzeageFin of Bronzeage = CatFin, SwadeshFin ** BronzeageI with
|
||||
(Lang = LangFin),
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
--# -path=.:compiled:prelude:resource-1.0/swadesh
|
||||
--# -path=.:resource-1.0/present:prelude:compiled
|
||||
|
||||
concrete BronzeageFre of Bronzeage = CatFre, SwadeshFre ** BronzeageI with
|
||||
(Lang = LangFre),
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
--# -path=.:compiled:resource-1.0/swadesh
|
||||
--# -path=.:resource-1.0/present:prelude:compiled
|
||||
|
||||
concrete BronzeageGer of Bronzeage = CatGer, SwadeshGer ** BronzeageI with
|
||||
(Lang = LangGer),
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
--# -path=.:compiled:prelude:resource-1.0/swadesh
|
||||
--# -path=.:resource-1.0/present:prelude:compiled
|
||||
|
||||
concrete BronzeageIta of Bronzeage = CatIta, SwadeshIta ** BronzeageI with
|
||||
(Lang = LangIta),
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
--# -path=.:compiled:prelude:resource-1.0/swadesh
|
||||
--# -path=.:resource-1.0/present:prelude:compiled
|
||||
|
||||
concrete BronzeageNor of Bronzeage = CatNor, SwadeshNor ** BronzeageI with
|
||||
(Lang = LangNor),
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
--# -path=.:compiled:prelude:resource-1.0/swadesh
|
||||
--# -path=.:resource-1.0/present:prelude:compiled
|
||||
|
||||
concrete BronzeageSpa of Bronzeage = CatSpa, SwadeshSpa ** BronzeageI with
|
||||
(Lang = LangSpa),
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
--# -path=.:compiled:prelude:resource-1.0/swadesh
|
||||
--# -path=.:resource-1.0/present:prelude:compiled
|
||||
|
||||
concrete BronzeageSwe of Bronzeage = CatSwe, SwadeshSwe ** BronzeageI with
|
||||
(Lang = LangSwe),
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
--# -path=.:../finnish:../common:../abstract:../../prelude
|
||||
--# -path=.:../present:../finnish:../common:../abstract:../../prelude
|
||||
|
||||
concrete SwadeshFin of Swadesh = CatFin
|
||||
** open MorphoFin, LangFin, ParadigmsFin, Prelude in {
|
||||
@@ -1,19 +1,23 @@
|
||||
all: langs mathematical multimodal
|
||||
|
||||
test:
|
||||
test: langs
|
||||
echo "gr -cat=Text -number=11 -prob | tb" | gf -nocf -probs=lang.gfprob langs.gfcm
|
||||
|
||||
langs:
|
||||
echo "s ;; pm | wf langs.gfcm" | gf -nocf */Lang??*.gf english/LangEng.gf +RTS -M500M -K100M
|
||||
|
||||
mathematical:
|
||||
gf -nocf -gfc mathematical/Mathematical???.gf +RTS -M800M -K100M
|
||||
present:
|
||||
gf -batch -nocf -preproc=./mkPresent */Lang??*.gf
|
||||
cp -p */*.gfc */*.gfr present
|
||||
|
||||
multimodal:
|
||||
gf -nocf -gfc multimodal/Multimodal???.gf +RTS -M500M -K100M
|
||||
mathematical: present
|
||||
gf -batch -nocf -preproc=./mkPresent mathematical/Mathematical???.gf
|
||||
|
||||
multimodal: present
|
||||
gf -batch -nocf -preproc=./mkPresent multimodal/Multimodal???.gf
|
||||
|
||||
install:
|
||||
cp -p */*.gfc */*.gfr ../compiled
|
||||
cp -p */*.gfc */*.gfr langs
|
||||
|
||||
stat:
|
||||
wc */*.gfc
|
||||
|
||||
@@ -5,22 +5,25 @@
|
||||
-- forms of sentences. Together they give 2 x 4 x 4 = 16 sentence forms.
|
||||
|
||||
-- These tenses are defined for all languages in the library. More tenses
|
||||
-- can be defined in the language extensions, e.g. the "passé simple" of
|
||||
-- can be defined in the language extensions, e.g. the "passé simple" of
|
||||
-- Romance languages.
|
||||
|
||||
abstract Common = {
|
||||
|
||||
cat
|
||||
Text ; -- text consisting of several phrases
|
||||
Phr ; -- phrase in a text e.g. "But be quiet my darling."
|
||||
Phr ; -- phrase in a text e.g. "But come here my darling."
|
||||
|
||||
Pol ;
|
||||
Tense ;
|
||||
Ant ;
|
||||
|
||||
fun
|
||||
PPos, PNeg : Pol ; -- I sleep/don't sleep
|
||||
TPres, TPast, TFut, TCond : Tense ; -- I sleep/slept/will sleep/would sleep
|
||||
ASimul, AAnter : Ant ; -- I sleep/have slept
|
||||
PPos, PNeg : Pol ; -- I sleep/don't sleep
|
||||
|
||||
TPres : Tense ;
|
||||
ASimul : Ant ;
|
||||
TPast, TFut, TCond : Tense ; -- I slept/will sleep/would sleep --# notpresent
|
||||
AAnter : Ant ; -- I have slept --# notpresent
|
||||
|
||||
}
|
||||
|
||||
@@ -11,10 +11,10 @@ concrete CommonX of Common = open (R = ParamX) in {
|
||||
PPos = {s = []} ** {p = R.Pos} ;
|
||||
PNeg = {s = []} ** {p = R.Neg} ;
|
||||
TPres = {s = []} ** {t = R.Pres} ;
|
||||
TPast = {s = []} ** {t = R.Past} ;
|
||||
TFut = {s = []} ** {t = R.Fut} ;
|
||||
TCond = {s = []} ** {t = R.Cond} ;
|
||||
TPast = {s = []} ** {t = R.Past} ; --# notpresent
|
||||
TFut = {s = []} ** {t = R.Fut} ; --# notpresent
|
||||
TCond = {s = []} ** {t = R.Cond} ; --# notpresent
|
||||
ASimul = {s = []} ** {a = R.Simul} ;
|
||||
AAnter = {s = []} ** {a = R.Anter} ;
|
||||
AAnter = {s = []} ** {a = R.Anter} ; --# notpresent
|
||||
|
||||
}
|
||||
|
||||
@@ -5,8 +5,19 @@ resource ParamX = open Prelude in {
|
||||
Person = P1 | P2 | P3 ;
|
||||
Degree = Posit | Compar | Superl ;
|
||||
|
||||
Anteriority = Simul | Anter ;
|
||||
Tense = Pres | Past | Fut | Cond ;
|
||||
Anteriority =
|
||||
Simul
|
||||
| Anter --# notpresent
|
||||
;
|
||||
Tense =
|
||||
Pres
|
||||
| Past --# notpresent
|
||||
| Fut --# notpresent
|
||||
| Cond --# notpresent
|
||||
;
|
||||
|
||||
param
|
||||
|
||||
Polarity = Pos | Neg ;
|
||||
|
||||
QForm = QDir | QIndir ;
|
||||
|
||||
@@ -37,6 +37,7 @@ concrete CatEng of Cat = CommonX ** open ResEng, Prelude in {
|
||||
VP = {
|
||||
s : Tense => Anteriority => Polarity => Order => Agr => {fin, inf : Str} ;
|
||||
prp : Str ; -- present participle
|
||||
inf : Str ; -- infinitive
|
||||
ad : Str ;
|
||||
s2 : Agr => Str
|
||||
} ;
|
||||
|
||||
@@ -34,11 +34,21 @@ resource ResEng = ParamX ** open Prelude in {
|
||||
-- Only these five forms are needed for open-lexicon verbs.
|
||||
|
||||
param
|
||||
VForm = VInf | VPres | VPast | VPPart | VPresPart ;
|
||||
VForm =
|
||||
VInf
|
||||
| VPres
|
||||
| VPPart
|
||||
| VPresPart
|
||||
| VPast --# notpresent
|
||||
;
|
||||
|
||||
-- Auxiliary verbs have special negative forms.
|
||||
|
||||
VVForm = VVF VForm | VVPresNeg | VVPastNeg ;
|
||||
VVForm =
|
||||
VVF VForm
|
||||
| VVPresNeg
|
||||
| VVPastNeg --# notpresent
|
||||
;
|
||||
|
||||
-- The order of sentence is needed already in $VP$.
|
||||
|
||||
@@ -102,7 +112,7 @@ resource ResEng = ParamX ** open Prelude in {
|
||||
s = table {
|
||||
VInf => go ;
|
||||
VPres => goes ;
|
||||
VPast => went ;
|
||||
VPast => went ; --# notpresent
|
||||
VPPart => gone ;
|
||||
VPresPart => going
|
||||
} ;
|
||||
@@ -164,6 +174,7 @@ resource ResEng = ParamX ** open Prelude in {
|
||||
VP : Type = {
|
||||
s : VerbForms ;
|
||||
prp : Str ; -- present participle
|
||||
inf : Str ; -- infinitive
|
||||
ad : Str ;
|
||||
s2 : Agr => Str
|
||||
} ;
|
||||
@@ -176,7 +187,6 @@ resource ResEng = ParamX ** open Prelude in {
|
||||
let
|
||||
inf = verb.s ! VInf ;
|
||||
fin = presVerb verb agr ;
|
||||
past = verb.s ! VPast ;
|
||||
part = verb.s ! VPPart ;
|
||||
vf : Str -> Str -> {fin, inf : Str} = \x,y ->
|
||||
{fin = x ; inf = y} ;
|
||||
@@ -184,24 +194,25 @@ resource ResEng = ParamX ** open Prelude in {
|
||||
case <t,ant,b,ord> of {
|
||||
<Pres,Simul,Pos,ODir> => vf fin [] ; --- should be opp
|
||||
<Pres,Simul,Pos,OQuest> => vf (does agr) inf ;
|
||||
<Pres,Simul,Neg,_> => vf (doesnt agr) inf ;
|
||||
<Pres,Anter,Pos,_> => vf (have agr) part ;
|
||||
<Pres,Anter,Neg,_> => vf (havent agr) part ;
|
||||
<Past,Simul,Pos,ODir> => vf past [] ; --- should be opp
|
||||
<Past,Simul,Pos,OQuest> => vf "did" inf ;
|
||||
<Past,Simul,Neg,_> => vf "didn't" inf ;
|
||||
<Past,Anter,Pos,_> => vf "had" part ;
|
||||
<Past,Anter,Neg,_> => vf "hadn't" part ;
|
||||
<Fut, Simul,Pos,_> => vf "will" inf ;
|
||||
<Fut, Simul,Neg,_> => vf "won't" inf ;
|
||||
<Fut, Anter,Pos,_> => vf "will" ("have" ++ part) ;
|
||||
<Fut, Anter,Neg,_> => vf "won't" ("have" ++ part) ;
|
||||
<Cond,Simul,Pos,_> => vf "would" inf ;
|
||||
<Cond,Simul,Neg,_> => vf "wouldn't" inf ;
|
||||
<Cond,Anter,Pos,_> => vf "would" ("have" ++ part) ;
|
||||
<Cond,Anter,Neg,_> => vf "wouldn't" ("have" ++ part)
|
||||
<Pres,Anter,Pos,_> => vf (have agr) part ; --# notpresent
|
||||
<Pres,Anter,Neg,_> => vf (havent agr) part ; --# notpresent
|
||||
<Past,Simul,Pos,ODir> => vf (verb.s ! VPast) [] ; --# notpresent --- should be opp
|
||||
<Past,Simul,Pos,OQuest> => vf "did" inf ; --# notpresent
|
||||
<Past,Simul,Neg,_> => vf "didn't" inf ; --# notpresent
|
||||
<Past,Anter,Pos,_> => vf "had" part ; --# notpresent
|
||||
<Past,Anter,Neg,_> => vf "hadn't" part ; --# notpresent
|
||||
<Fut, Simul,Pos,_> => vf "will" inf ; --# notpresent
|
||||
<Fut, Simul,Neg,_> => vf "won't" inf ; --# notpresent
|
||||
<Fut, Anter,Pos,_> => vf "will" ("have" ++ part) ; --# notpresent
|
||||
<Fut, Anter,Neg,_> => vf "won't" ("have" ++ part) ; --# notpresent
|
||||
<Cond,Simul,Pos,_> => vf "would" inf ; --# notpresent
|
||||
<Cond,Simul,Neg,_> => vf "wouldn't" inf ; --# notpresent
|
||||
<Cond,Anter,Pos,_> => vf "would" ("have" ++ part) ; --# notpresent
|
||||
<Cond,Anter,Neg,_> => vf "wouldn't" ("have" ++ part) ; --# notpresent
|
||||
<Pres,Simul,Neg,_> => vf (doesnt agr) inf
|
||||
} ;
|
||||
prp = verb.s ! VPresPart ;
|
||||
inf = verb.s ! VInf ;
|
||||
ad = [] ;
|
||||
s2 = \\a => if_then_Str verb.isRefl (reflPron ! a) []
|
||||
} ;
|
||||
@@ -211,28 +222,28 @@ resource ResEng = ParamX ** open Prelude in {
|
||||
let
|
||||
inf = verb.inf ;
|
||||
fin = verb.pres ! b ! agr ;
|
||||
past = verb.past ! b ! agr ;
|
||||
part = verb.ppart ;
|
||||
vf : Str -> Str -> {fin, inf : Str} = \x,y ->
|
||||
{fin = x ; inf = y} ;
|
||||
in
|
||||
case <t,ant,b,ord> of {
|
||||
<Pres,Simul,_, _> => vf fin [] ;
|
||||
<Pres,Anter,Pos,_> => vf (have agr) part ;
|
||||
<Pres,Anter,Neg,_> => vf (havent agr) part ;
|
||||
<Past,Simul,_, _> => vf past [] ;
|
||||
<Past,Anter,Pos,_> => vf "had" part ;
|
||||
<Past,Anter,Neg,_> => vf "hadn't" part ;
|
||||
<Fut, Simul,Pos,_> => vf "will" inf ;
|
||||
<Fut, Simul,Neg,_> => vf "won't" inf ;
|
||||
<Fut, Anter,Pos,_> => vf "will" ("have" ++ part) ;
|
||||
<Fut, Anter,Neg,_> => vf "won't" ("have" ++ part) ;
|
||||
<Cond,Simul,Pos,_> => vf "would" inf ;
|
||||
<Cond,Simul,Neg,_> => vf "wouldn't" inf ;
|
||||
<Cond,Anter,Pos,_> => vf "would" ("have" ++ part) ;
|
||||
<Cond,Anter,Neg,_> => vf "wouldn't" ("have" ++ part)
|
||||
<Pres,Anter,Pos,_> => vf (have agr) part ; --# notpresent
|
||||
<Pres,Anter,Neg,_> => vf (havent agr) part ; --# notpresent
|
||||
<Past,Simul,_, _> => vf (verb.past ! b ! agr) [] ; --# notpresent
|
||||
<Past,Anter,Pos,_> => vf "had" part ; --# notpresent
|
||||
<Past,Anter,Neg,_> => vf "hadn't" part ; --# notpresent
|
||||
<Fut, Simul,Pos,_> => vf "will" inf ; --# notpresent
|
||||
<Fut, Simul,Neg,_> => vf "won't" inf ; --# notpresent
|
||||
<Fut, Anter,Pos,_> => vf "will" ("have" ++ part) ; --# notpresent
|
||||
<Fut, Anter,Neg,_> => vf "won't" ("have" ++ part) ; --# notpresent
|
||||
<Cond,Simul,Pos,_> => vf "would" inf ; --# notpresent
|
||||
<Cond,Simul,Neg,_> => vf "wouldn't" inf ; --# notpresent
|
||||
<Cond,Anter,Pos,_> => vf "would" ("have" ++ part) ; --# notpresent
|
||||
<Cond,Anter,Neg,_> => vf "wouldn't" ("have" ++ part) ; --# notpresent
|
||||
<Pres,Simul,_, _> => vf fin []
|
||||
} ;
|
||||
prp = verb.prpart ;
|
||||
inf = verb.inf ;
|
||||
ad = [] ;
|
||||
s2 = \\_ => []
|
||||
} ;
|
||||
@@ -240,6 +251,7 @@ resource ResEng = ParamX ** open Prelude in {
|
||||
insertObj : (Agr => Str) -> VP -> VP = \obj,vp -> {
|
||||
s = vp.s ;
|
||||
prp = vp.prp ;
|
||||
inf = vp.inf ;
|
||||
ad = vp.ad ;
|
||||
s2 = \\a => vp.s2 ! a ++ obj ! a
|
||||
} ;
|
||||
@@ -249,6 +261,7 @@ resource ResEng = ParamX ** open Prelude in {
|
||||
insertAdV : Str -> VP -> VP = \adv,vp -> {
|
||||
s = vp.s ;
|
||||
prp = vp.prp ;
|
||||
inf = vp.inf ;
|
||||
ad = vp.ad ++ adv ;
|
||||
s2 = \\a => vp.s2 ! a
|
||||
} ;
|
||||
@@ -264,10 +277,10 @@ resource ResEng = ParamX ** open Prelude in {
|
||||
Pos => \\_ => verbs ! VVF VPres ;
|
||||
Neg => \\_ => verbs ! VVPresNeg
|
||||
} ;
|
||||
past = table {
|
||||
Pos => \\_ => verbs ! VVF VPast ;
|
||||
Neg => \\_ => verbs ! VVPastNeg
|
||||
} ;
|
||||
past = table { --# notpresent
|
||||
Pos => \\_ => verbs ! VVF VPast ; --# notpresent
|
||||
Neg => \\_ => verbs ! VVPastNeg --# notpresent
|
||||
} ; --# notpresent
|
||||
inf = verbs ! VVF VInf ;
|
||||
ppart = verbs ! VVF VPPart ;
|
||||
prpart = verbs ! VVF VPresPart ;
|
||||
@@ -280,7 +293,7 @@ resource ResEng = ParamX ** open Prelude in {
|
||||
|
||||
infVP : Bool -> VP -> Agr -> Str = \isAux,vp,a ->
|
||||
if_then_Str isAux [] "to" ++
|
||||
(vp.s ! Fut ! Simul ! Neg ! ODir ! a).inf ++ vp.s2 ! a ;
|
||||
vp.inf ++ vp.s2 ! a ;
|
||||
|
||||
agrVerb : Str -> Str -> Agr -> Str = \has,have,agr ->
|
||||
case agr of {
|
||||
@@ -293,7 +306,11 @@ resource ResEng = ParamX ** open Prelude in {
|
||||
does = agrVerb "does" "do" ;
|
||||
doesnt = agrVerb "doesn't" "don't" ;
|
||||
|
||||
Aux = {pres,past : Polarity => Agr => Str ; inf,ppart,prpart : Str} ;
|
||||
Aux = {
|
||||
pres : Polarity => Agr => Str ;
|
||||
past : Polarity => Agr => Str ; --# notpresent
|
||||
inf,ppart,prpart : Str
|
||||
} ;
|
||||
|
||||
auxBe : Aux = {
|
||||
pres = \\b,a => case <b,a> of {
|
||||
@@ -301,10 +318,10 @@ resource ResEng = ParamX ** open Prelude in {
|
||||
<Neg,{n = Sg ; p = P1}> => ["am not"] ; --- am not I
|
||||
_ => agrVerb (posneg b "is") (posneg b "are") a
|
||||
} ;
|
||||
past = \\b,a => case a of {
|
||||
{n = Sg ; p = P1|P3} => (posneg b "was") ;
|
||||
_ => (posneg b "were")
|
||||
} ;
|
||||
past = \\b,a => case a of { --# notpresent
|
||||
{n = Sg ; p = P1|P3} => (posneg b "was") ; --# notpresent
|
||||
_ => (posneg b "were") --# notpresent
|
||||
} ; --# notpresent
|
||||
inf = "be" ;
|
||||
ppart = "been" ;
|
||||
prpart = "being"
|
||||
|
||||
@@ -69,8 +69,8 @@ param
|
||||
VForm =
|
||||
Inf InfForm
|
||||
| Presn Number Person
|
||||
| Impf Number Person
|
||||
| Condit Number Person
|
||||
| Impf Number Person --# notpresent
|
||||
| Condit Number Person --# notpresent
|
||||
| Imper Number
|
||||
| ImperP3 Number
|
||||
| ImperP1Pl
|
||||
@@ -169,10 +169,11 @@ oper
|
||||
} ;
|
||||
|
||||
einegole : Str * Str * Str = case <vi,agr.n> of {
|
||||
<VIFin (Pres | Fut),_> => <eiv, verbs ! Imper Sg, "ole"> ;
|
||||
<VIFin Cond, _> => <eiv, verbs ! Condit Sg P3, "olisi"> ;
|
||||
<VIFin Past, Sg> => <eiv, part, "ollut"> ;
|
||||
<VIFin Past, Pl> => <eiv, part, "olleet"> ;
|
||||
<VIFin Pres,_> => <eiv, verbs ! Imper Sg, "ole"> ;
|
||||
<VIFin Fut,_> => <eiv, verbs ! Imper Sg, "ole"> ; --# notpresent
|
||||
<VIFin Cond, _> => <eiv, verbs ! Condit Sg P3, "olisi"> ; --# notpresent
|
||||
<VIFin Past, Sg> => <eiv, part, "ollut"> ; --# notpresent
|
||||
<VIFin Past, Pl> => <eiv, part, "olleet"> ; --# notpresent
|
||||
<VIImper, Sg> => <"älä", verbs ! Imper Sg, "ole"> ;
|
||||
<VIImper, Pl> => <"älkää", verbs ! ImpNegPl, "olko"> ;
|
||||
<VIPass, _> => <"ei", verbs ! Pass False, "ole"> ;
|
||||
@@ -189,15 +190,16 @@ oper
|
||||
{fin = x ; inf = y} ;
|
||||
mkvf : VForm -> {fin, inf : Str} = \p -> case <ant,b> of {
|
||||
<Simul,Pos> => vf (verbs ! p) [] ;
|
||||
<Simul,Neg> => vf ei neg ;
|
||||
<Anter,Pos> => vf (olla ! p) part ;
|
||||
<Anter,Neg> => vf ei (ole ++ part)
|
||||
<Anter,Pos> => vf (olla ! p) part ; --# notpresent
|
||||
<Anter,Neg> => vf ei (ole ++ part) ; --# notpresent
|
||||
<Simul,Neg> => vf ei neg
|
||||
}
|
||||
in
|
||||
case vi of {
|
||||
VIFin Past => mkvf (Impf agr.n agr.p) ;
|
||||
VIFin Cond => mkvf (Condit agr.n agr.p) ;
|
||||
VIFin (Pres | Fut) => mkvf (Presn agr.n agr.p) ;
|
||||
VIFin Past => mkvf (Impf agr.n agr.p) ; --# notpresent
|
||||
VIFin Cond => mkvf (Condit agr.n agr.p) ; --# notpresent
|
||||
VIFin Fut => mkvf (Presn agr.n agr.p) ; --# notpresent
|
||||
VIFin Pres => mkvf (Presn agr.n agr.p) ;
|
||||
VIImper => mkvf (Imper agr.n) ;
|
||||
VIPass => mkvf (Pass True) ;
|
||||
VIInf i => mkvf (Inf i)
|
||||
@@ -318,18 +320,18 @@ oper
|
||||
Presn Pl P1 => tuje + "mme" ;
|
||||
Presn Pl P2 => tuje + "tte" ;
|
||||
Presn Pl P3 => tulevat ;
|
||||
Impf Sg P1 => tuji + "n" ;
|
||||
Impf Sg P2 => tuji + "t" ;
|
||||
Impf Sg P3 => tuli ;
|
||||
Impf Pl P1 => tuji + "mme" ;
|
||||
Impf Pl P2 => tuji + "tte" ;
|
||||
Impf Pl P3 => tuli + vat ;
|
||||
Condit Sg P1 => tulisi + "n" ;
|
||||
Condit Sg P2 => tulisi + "t" ;
|
||||
Condit Sg P3 => tulisi ;
|
||||
Condit Pl P1 => tulisi + "mme" ;
|
||||
Condit Pl P2 => tulisi + "tte" ;
|
||||
Condit Pl P3 => tulisi + vat ;
|
||||
Impf Sg P1 => tuji + "n" ; --# notpresent
|
||||
Impf Sg P2 => tuji + "t" ; --# notpresent
|
||||
Impf Sg P3 => tuli ; --# notpresent
|
||||
Impf Pl P1 => tuji + "mme" ; --# notpresent
|
||||
Impf Pl P2 => tuji + "tte" ; --# notpresent
|
||||
Impf Pl P3 => tuli + vat ; --# notpresent
|
||||
Condit Sg P1 => tulisi + "n" ; --# notpresent
|
||||
Condit Sg P2 => tulisi + "t" ; --# notpresent
|
||||
Condit Sg P3 => tulisi ; --# notpresent
|
||||
Condit Pl P1 => tulisi + "mme" ; --# notpresent
|
||||
Condit Pl P2 => tulisi + "tte" ; --# notpresent
|
||||
Condit Pl P3 => tulisi + vat ; --# notpresent
|
||||
Imper Sg => tuje ;
|
||||
Imper Pl => tulkaa ;
|
||||
ImperP3 Sg => tulko + o + "n" ;
|
||||
|
||||
@@ -227,11 +227,11 @@ oper
|
||||
VInfin => aller ! Inf ;
|
||||
VFin (VPres Indic) n p => aller ! Indi Presn n p ;
|
||||
VFin (VPres Subjunct) n p => aller ! Subjo SPres n p ;
|
||||
VFin (VImperf Indic) n p => aller ! Indi Imparf n p ;
|
||||
VFin (VImperf Subjunct) n p => aller ! Subjo SImparf n p ;
|
||||
VFin VPasse n p => aller ! Indi Passe n p ;
|
||||
VFin VFut n p => aller ! Indi Futur n p ;
|
||||
VFin VCondit n p => aller ! Condi n p ;
|
||||
VFin (VImperf Indic) n p => aller ! Indi Imparf n p ; --# notpresent
|
||||
VFin (VImperf Subjunct) n p => aller ! Subjo SImparf n p ; --# notpresent
|
||||
VFin VPasse n p => aller ! Indi Passe n p ; --# notpresent
|
||||
VFin VFut n p => aller ! Indi Futur n p ; --# notpresent
|
||||
VFin VCondit n p => aller ! Condi n p ; --# notpresent
|
||||
VImper np => aller ! Imper np ;
|
||||
VPart g n => aller ! Part (PPasse g n) ;
|
||||
VGer => aller ! Part PPres -- *en* allant
|
||||
|
||||
@@ -52,8 +52,8 @@ resource ResGer = ParamX ** open Prelude in {
|
||||
| VPresInd Number Person
|
||||
| VPresSubj Number Person
|
||||
| VImper Number
|
||||
| VImpfInd Number Person
|
||||
| VImpfSubj Number Person
|
||||
| VImpfInd Number Person --# notpresent
|
||||
| VImpfSubj Number Person --# notpresent
|
||||
| VPresPart AForm
|
||||
| VPastPart AForm ;
|
||||
|
||||
@@ -130,7 +130,7 @@ resource ResGer = ParamX ** open Prelude in {
|
||||
vFin : Tense -> Agr -> VForm = \t,a ->
|
||||
case t of {
|
||||
Pres => VPresInd a.n a.p ;
|
||||
Past => VImpfInd a.n a.p ;
|
||||
Past => VImpfInd a.n a.p ; --# notpresent
|
||||
_ => VInf --- never used
|
||||
} ;
|
||||
|
||||
@@ -207,18 +207,18 @@ resource ResGer = ParamX ** open Prelude in {
|
||||
VImper Sg => gib ;
|
||||
VImper Pl => gebt ;
|
||||
VPresSubj Sg P2 => init geben + "st" ;
|
||||
VPresSubj Sg _ => init geben ;
|
||||
VPresSubj Pl P2 => init geben + "t" ;
|
||||
VPresSubj Pl _ => geben ;
|
||||
VPresSubj Sg _ => init geben ;
|
||||
VPresSubj Pl P2 => init geben + "t" ;
|
||||
VPresSubj Pl _ => geben ;
|
||||
VPresPart a => (regA (geben + "d")).s ! Posit ! a ;
|
||||
VImpfInd Sg P2 => gabst ;
|
||||
VImpfInd Sg _ => gab ;
|
||||
VImpfInd Pl P2 => gabt ;
|
||||
VImpfInd Pl _ => gaben ;
|
||||
VImpfSubj Sg P2 => gaebe + "st" ;
|
||||
VImpfSubj Sg _ => gaebe ;
|
||||
VImpfSubj Pl P2 => gaebe + "t" ;
|
||||
VImpfSubj Pl _ => gaebe + "n" ;
|
||||
VImpfInd Sg P2 => gabst ; --# notpresent
|
||||
VImpfInd Sg _ => gab ; --# notpresent
|
||||
VImpfInd Pl P2 => gabt ; --# notpresent
|
||||
VImpfInd Pl _ => gaben ; --# notpresent
|
||||
VImpfSubj Sg P2 => gaebe + "st" ; --# notpresent
|
||||
VImpfSubj Sg _ => gaebe ; --# notpresent
|
||||
VImpfSubj Pl P2 => gaebe + "t" ; --# notpresent
|
||||
VImpfSubj Pl _ => gaebe + "n" ; --# notpresent
|
||||
VPastPart a => (regA gegeben).s ! Posit ! a
|
||||
} ;
|
||||
prefix = ein ;
|
||||
@@ -346,7 +346,7 @@ resource ResGer = ParamX ** open Prelude in {
|
||||
haben : Str = vHaben ! VInf ;
|
||||
|
||||
wird : Agr -> Str = \a -> werden_V.s ! VPresInd a.n a.p ;
|
||||
wuerde : Agr -> Str = \a -> werden_V.s ! VImpfSubj a.n a.p ;
|
||||
wuerde : Agr -> Str = \a -> werden_V.s ! VImpfSubj a.n a.p ; --# notpresent
|
||||
|
||||
auf = verb.prefix ;
|
||||
|
||||
@@ -357,18 +357,20 @@ resource ResGer = ParamX ** open Prelude in {
|
||||
in {
|
||||
s = \\a => table {
|
||||
VPFinite t Simul => case t of {
|
||||
Pres | Past => vf (vfin t a) [] ;
|
||||
Fut => vf (wird a) vinf ;
|
||||
Cond => vf (wuerde a) vinf
|
||||
} ;
|
||||
VPFinite t Anter => case t of {
|
||||
Pres | Past => vf (hat t a) vpart ;
|
||||
Fut => vf (wird a) (vpart ++ haben) ;
|
||||
Cond => vf (wuerde a) (vpart ++ haben)
|
||||
-- Pres | Past => vf (vfin t a) [] ; -- the general rule
|
||||
Past => vf (vfin t a) [] ; --# notpresent
|
||||
Fut => vf (wird a) vinf ; --# notpresent
|
||||
Cond => vf (wuerde a) vinf ; --# notpresent
|
||||
Pres => vf (vfin t a) []
|
||||
} ;
|
||||
VPFinite t Anter => case t of { --# notpresent
|
||||
Pres | Past => vf (hat t a) vpart ; --# notpresent
|
||||
Fut => vf (wird a) (vpart ++ haben) ; --# notpresent
|
||||
Cond => vf (wuerde a) (vpart ++ haben) --# notpresent
|
||||
} ; --# notpresent
|
||||
VPImperat => vf (verb.s ! VImper a.n) [] ;
|
||||
VPInfinit Simul => vf [] vinf ;
|
||||
VPInfinit Anter => vf [] (vpart ++ haben)
|
||||
VPInfinit Anter => vf [] (vpart ++ haben) ; --# notpresent
|
||||
VPInfinit Simul => vf [] vinf
|
||||
} ;
|
||||
a1 : Polarity => Str = negation ;
|
||||
n2 : Agr => Str = case verb.vtype of {
|
||||
@@ -503,10 +505,12 @@ resource ResGer = ParamX ** open Prelude in {
|
||||
compl = obj ++ neg ++ vp.a2 ;
|
||||
inf = vp.inf ++ verb.inf ;
|
||||
extra = vp.ext ;
|
||||
inffin = case <a,vp.isAux> of {
|
||||
<Anter,True> => verb.fin ++ inf ; -- double infinitive
|
||||
_ => inf ++ verb.fin --- or just auxiliary vp
|
||||
}
|
||||
inffin =
|
||||
case <a,vp.isAux> of { --# notpresent
|
||||
<Anter,True> => verb.fin ++ inf ; -- double infinitive --# notpresent
|
||||
_ => --# notpresent
|
||||
inf ++ verb.fin --- or just auxiliary vp
|
||||
} --# notpresent
|
||||
in
|
||||
case o of {
|
||||
Main => subj ++ verb.fin ++ compl ++ inf ++ extra ;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,4 @@
|
||||
--# -path=.:../english:../abstract:../common:prelude
|
||||
--# -path=.:../present:prelude
|
||||
|
||||
concrete MathematicalEng of Mathematical =
|
||||
NounEng - [ComplN2], --- to avoid ambiguity
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
--# -path=.:../finnish:../abstract:../common:prelude
|
||||
--# -path=.:../present:prelude
|
||||
|
||||
concrete MathematicalFin of Mathematical =
|
||||
NounFin - [ComplN2], --- to avoid ambiguity
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
--# -path=.:../french:../romance:../abstract:../common:prelude
|
||||
--# -path=.:../present:prelude
|
||||
|
||||
concrete MathematicalFre of Mathematical =
|
||||
NounFre - [ComplN2], --- to avoid ambiguity
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
--# -path=.:../german:../abstract:../common:prelude
|
||||
--# -path=.:../present:prelude
|
||||
|
||||
concrete MathematicalGer of Mathematical =
|
||||
NounGer - [ComplN2], --- to avoid ambiguity
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
--# -path=.:../italian:../romance:../abstract:../common:prelude
|
||||
--# -path=.:../present:prelude
|
||||
|
||||
concrete MathematicalIta of Mathematical =
|
||||
NounIta - [ComplN2], --- to avoid ambiguity
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
--# -path=.:../norwegian:../scandinavian:../abstract:../common:prelude
|
||||
--# -path=.:../present:prelude
|
||||
|
||||
concrete MathematicalNor of Mathematical =
|
||||
NounNor - [ComplN2], --- to avoid ambiguity
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
--# -path=.:../spanish:../romance:../abstract:../common:prelude
|
||||
--# -path=.:../present:prelude
|
||||
|
||||
concrete MathematicalSpa of Mathematical =
|
||||
NounSpa - [ComplN2], --- to avoid ambiguity
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
--# -path=.:../swedish:../scandinavian:../abstract:../common:prelude
|
||||
--# -path=.:../present:prelude
|
||||
|
||||
concrete MathematicalSwe of Mathematical =
|
||||
NounSwe - [ComplN2], --- to avoid ambiguity
|
||||
|
||||
1
lib/resource-1.0/mkPresent
Normal file
1
lib/resource-1.0/mkPresent
Normal file
@@ -0,0 +1 @@
|
||||
grep -v "\-\-\# notpresent" $1
|
||||
@@ -1,4 +1,4 @@
|
||||
--# -path=.:../english/:../abstract:../common:prelude
|
||||
--# -path=.:../present:prelude
|
||||
|
||||
concrete MultimodalEng of Multimodal =
|
||||
NounEng,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
--# -path=.:../finnish/:../abstract:../common:prelude
|
||||
--# -path=.:../present:prelude
|
||||
|
||||
concrete MultimodalFin of Multimodal =
|
||||
NounFin,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
--# -path=.:../french/:../romance:../abstract:../common:prelude
|
||||
--# -path=.:../present:prelude
|
||||
|
||||
concrete MultimodalFre of Multimodal =
|
||||
NounFre,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
--# -path=.:../german/:../abstract:../common:prelude
|
||||
--# -path=.:../present:prelude
|
||||
|
||||
concrete MultimodalGer of Multimodal =
|
||||
NounGer,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
--# -path=.:../italian/:../romance:../abstract:../common:prelude
|
||||
--# -path=.:../present:prelude
|
||||
|
||||
concrete MultimodalIta of Multimodal =
|
||||
NounIta,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
--# -path=.:../norwegian/:../scandinavian:../abstract:../common:prelude
|
||||
--# -path=.:../present:prelude
|
||||
|
||||
concrete MultimodalNor of Multimodal =
|
||||
NounNor,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
--# -path=.:../spanish/:../romance:../abstract:../common:prelude
|
||||
--# -path=.:../present:prelude
|
||||
|
||||
concrete MultimodalSpa of Multimodal =
|
||||
NounSpa,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
--# -path=.:../swedish/:../scandinavian:../abstract:../common:prelude
|
||||
--# -path=.:../present:prelude
|
||||
|
||||
concrete MultimodalSwe of Multimodal =
|
||||
NounSwe,
|
||||
|
||||
@@ -87,8 +87,8 @@ oper
|
||||
VI (VInfin v) => mkVoice v spise ;
|
||||
VF (VPres Act) => spiser ;
|
||||
VF (VPres Pass) => spises ;
|
||||
VF (VPret v) => mkVoice v spiste ;
|
||||
VI (VSupin v) => mkVoice v spist ;
|
||||
VF (VPret v) => mkVoice v spiste ; --# notpresent
|
||||
VI (VSupin v) => mkVoice v spist ; --# notpresent
|
||||
VI (VPtPret (Strong (SgUtr | SgNeutr)) c) => mkCase c spist ;
|
||||
VI (VPtPret _ c) => case last spist of {
|
||||
"a" => mkCase c spist ;
|
||||
|
||||
@@ -90,11 +90,11 @@ param
|
||||
;
|
||||
|
||||
TMood =
|
||||
VPres Mood
|
||||
| VImperf Mood
|
||||
| VPasse
|
||||
| VFut
|
||||
| VCondit
|
||||
VPres Mood
|
||||
| VImperf Mood --# notpresent
|
||||
| VPasse --# notpresent
|
||||
| VFut --# notpresent
|
||||
| VCondit --# notpresent
|
||||
;
|
||||
|
||||
NumPersI = SgP2 | PlP1 | PlP2 ;
|
||||
|
||||
@@ -79,11 +79,11 @@ oper
|
||||
in {
|
||||
s = table {
|
||||
VPFinite t Simul => vf (vfin t) (\_ -> []) ;
|
||||
VPFinite t Anter => vf (habet t) vpart ;
|
||||
VPFinite t Anter => vf (habet t) vpart ; --# notpresent
|
||||
VPInfinit Anter => vf (\_ -> []) (\a -> habere ++ vpart a) ; --# notpresent
|
||||
VPImperat => vf vimp (\_ -> []) ;
|
||||
VPGerund => vf (\_ -> []) (\_ -> vger) ;
|
||||
VPInfinit Simul => vf (\_ -> []) (\_ -> vinf) ;
|
||||
VPInfinit Anter => vf (\_ -> []) (\a -> habere ++ vpart a)
|
||||
VPInfinit Simul => vf (\_ -> []) (\_ -> vinf)
|
||||
} ;
|
||||
agr = partAgr typ ;
|
||||
neg = negation ;
|
||||
@@ -174,10 +174,10 @@ oper
|
||||
s = \\t,a,b,m =>
|
||||
let
|
||||
tm = case t of {
|
||||
Pres => VPres m ;
|
||||
Past => VImperf m ;
|
||||
Fut => VFut ;
|
||||
Cond => VCondit
|
||||
Past => VImperf m ; --# notpresent
|
||||
Fut => VFut ; --# notpresent
|
||||
Cond => VCondit ; --# notpresent
|
||||
Pres => VPres m
|
||||
} ;
|
||||
vps = vp.s ! VPFinite tm a ;
|
||||
verb = vps.fin ! agr ;
|
||||
|
||||
@@ -38,13 +38,15 @@ param
|
||||
|
||||
VFin =
|
||||
VPres Voice
|
||||
| VPret Voice
|
||||
| VImper Voice ;
|
||||
| VPret Voice --# notpresent
|
||||
| VImper Voice
|
||||
;
|
||||
|
||||
VInf =
|
||||
VInfin Voice
|
||||
| VSupin Voice
|
||||
| VPtPret AFormPos Case ;
|
||||
| VSupin Voice --# notpresent
|
||||
| VPtPret AFormPos Case
|
||||
;
|
||||
|
||||
VPForm =
|
||||
VPFinite Tense Anteriority
|
||||
@@ -89,7 +91,7 @@ oper
|
||||
|
||||
vFin : Tense -> Voice -> VForm = \t,v -> case t of {
|
||||
Pres => VF (VPres v) ;
|
||||
Past => VF (VPret v) ;
|
||||
Past => VF (VPret v) ; --# notpresent
|
||||
_ => VI (VInfin v) --- not to be used?
|
||||
} ;
|
||||
|
||||
@@ -141,10 +143,10 @@ oper
|
||||
s = table {
|
||||
VF (VPres Act) => finner ;
|
||||
VF (VPres Pass) => mkVoice Pass finn ;
|
||||
VF (VPret v) => mkVoice v fann ;
|
||||
VF (VPret v) => mkVoice v fann ; --# notpresent
|
||||
VF (VImper v) => mkVoice v finn ;
|
||||
VI (VInfin v) => mkVoice v finna ;
|
||||
VI (VSupin v) => mkVoice v funnit ;
|
||||
VI (VSupin v) => mkVoice v funnit ; --# notpresent
|
||||
VI (VPtPret a c)=> mkCase c (mkAdjPos a funnen funnet funna funna)
|
||||
} ;
|
||||
vtype = VAct
|
||||
|
||||
@@ -24,7 +24,7 @@ interface ResScand = DiffScand ** open CommonScand, Prelude in {
|
||||
_ => Act
|
||||
} ;
|
||||
vfin : Tense -> Str = \t -> verb.s ! vFin t diath ;
|
||||
vsup = verb.s ! VI (VSupin diath) ;
|
||||
vsup = verb.s ! VI (VSupin diath) ; --# notpresent
|
||||
vinf = verb.s ! VI (VInfin diath) ;
|
||||
|
||||
har : Tense -> Str = \t -> verbHave.s ! vFin t Act ;
|
||||
@@ -37,18 +37,20 @@ interface ResScand = DiffScand ** open CommonScand, Prelude in {
|
||||
in {
|
||||
s = table {
|
||||
VPFinite t Simul => case t of {
|
||||
Pres | Past => vf (vfin t) [] ;
|
||||
Fut => vf auxFut vinf ;
|
||||
Cond => vf auxCond vinf
|
||||
} ;
|
||||
VPFinite t Anter => case t of {
|
||||
Pres | Past => vf (har t) vsup ;
|
||||
Fut => vf auxFut (ha ++ vsup) ;
|
||||
Cond => vf auxCond (ha ++ vsup)
|
||||
-- Pres | Past => vf (vfin t) [] ; -- the general rule
|
||||
Past => vf (vfin t) [] ; --# notpresent
|
||||
Fut => vf auxFut vinf ; --# notpresent
|
||||
Cond => vf auxCond vinf ; --# notpresent
|
||||
Pres => vf (vfin t) []
|
||||
} ;
|
||||
VPFinite t Anter => case t of { --# notpresent
|
||||
Pres | Past => vf (har t) vsup ; --# notpresent
|
||||
Fut => vf auxFut (ha ++ vsup) ; --# notpresent
|
||||
Cond => vf auxCond (ha ++ vsup) --# notpresent
|
||||
} ; --# notpresent
|
||||
VPImperat => vf (verb.s ! VF (VImper diath)) [] ;
|
||||
VPInfinit Simul => vf [] vinf ;
|
||||
VPInfinit Anter => vf [] (ha ++ vsup)
|
||||
VPInfinit Anter => vf [] (ha ++ vsup) ; --# notpresent
|
||||
VPInfinit Simul => vf [] vinf
|
||||
} ;
|
||||
a1 : Polarity => Str = negation ;
|
||||
n2 : Agr => Str = \\a => case verb.vtype of {
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -84,7 +84,7 @@ compileModule opts st0 file |
|
||||
grammar1 <- case suff of
|
||||
"cf" -> putp ("- parsing" +++ suff +++ file) $ getCFGrammar opts file
|
||||
"ebnf" -> putp ("- parsing" +++ suff +++ file) $ getEBNFGrammar opts file
|
||||
"gfm" -> putp ("- parsing" +++ suff +++ file) $ getSourceGrammar file
|
||||
"gfm" -> putp ("- parsing" +++ suff +++ file) $ getSourceGrammar opts file
|
||||
_ -> putp ("- parsing old gf" +++ file) $ getOldGrammar opts file
|
||||
let mods = modules grammar1
|
||||
let env = compileEnvShSt st0 []
|
||||
@@ -195,7 +195,7 @@ compileOne opts env@((_,srcgr,_),_) file = do
|
||||
|
||||
-- for compiled resource, parse and organize, then update environment
|
||||
"gfr" -> do
|
||||
sm0 <- putp ("| reading" +++ file) $ getSourceModule file
|
||||
sm0 <- putp ("| reading" +++ file) $ getSourceModule opts file
|
||||
sm <- {- putp "creating indirections" $ -} ioeErr $ extendModule mos sm0
|
||||
---- experiment with not optimizing gfr
|
||||
---- sm:_ <- putp " optimizing " $ ioeErr $ evalModule mos sm1
|
||||
@@ -206,7 +206,8 @@ compileOne opts env@((_,srcgr,_),_) file = do
|
||||
|
||||
-- for gf source, do full compilation
|
||||
_ -> do
|
||||
sm0 <- putpOpt ("- parsing" +++ file) ("- compiling" +++ file ++ "... ") $ getSourceModule file
|
||||
sm0 <- putpOpt ("- parsing" +++ file) ("- compiling" +++ file ++ "... ") $
|
||||
getSourceModule opts file
|
||||
(k',sm) <- makeSourceModule opts (fst env) sm0
|
||||
cm <- putpp " generating code... " $ generateModuleCode opts path sm
|
||||
ft <- getReadTimes file
|
||||
|
||||
@@ -44,16 +44,25 @@ import GF.Infra.ReadFiles ----
|
||||
import Data.Char (toUpper)
|
||||
import Data.List (nub)
|
||||
import Control.Monad (foldM)
|
||||
import System (system)
|
||||
|
||||
getSourceModule :: FilePath -> IOE SourceModule
|
||||
getSourceModule file = do
|
||||
getSourceModule :: Options -> FilePath -> IOE SourceModule
|
||||
getSourceModule opts file0 = do
|
||||
file <- case getOptVal opts usePreprocessor of
|
||||
Just p -> do
|
||||
let tmp = "_gf_preproc.tmp"
|
||||
cmd = p +++ file0 ++ ">" ++ tmp
|
||||
ioeIO $ system cmd
|
||||
-- ioeIO $ putStrLn $ "preproc" +++ cmd
|
||||
return tmp
|
||||
_ -> return file0
|
||||
string <- readFileIOE file
|
||||
let tokens = myLexer string
|
||||
mo1 <- ioeErr $ {- err2err $ -} pModDef tokens
|
||||
ioeErr $ transModDef mo1
|
||||
|
||||
getSourceGrammar :: FilePath -> IOE SourceGrammar
|
||||
getSourceGrammar file = do
|
||||
getSourceGrammar :: Options -> FilePath -> IOE SourceGrammar
|
||||
getSourceGrammar opts file = do
|
||||
string <- readFileIOE file
|
||||
let tokens = myLexer string
|
||||
gr1 <- ioeErr $ {- err2err $ -} pGrammar tokens
|
||||
|
||||
@@ -313,6 +313,7 @@ pathList = aOpt "path"
|
||||
uniCoding = aOpt "coding"
|
||||
probFile = aOpt "probs"
|
||||
noparseFile = aOpt "noparse"
|
||||
usePreprocessor = aOpt "preproc"
|
||||
|
||||
-- peb 16/3-05:
|
||||
gfcConversion :: String -> Option
|
||||
|
||||
@@ -74,6 +74,7 @@ txtHelpFile =
|
||||
"\n -optimize select an optimization to override file-defined flags" ++
|
||||
"\n -conversion select parsing method (values strict|nondet)" ++
|
||||
"\n -probs read probabilities from file (format (--# prob) Fun Double)" ++
|
||||
"\n -preproc use a preprocessor on each source file" ++
|
||||
"\n -noparse read nonparsable functions from file (format --# noparse Funs) " ++
|
||||
"\n examples:" ++
|
||||
"\n i English.gf -- ordinary import of Concrete" ++
|
||||
|
||||
@@ -170,7 +170,7 @@ optionsOfCommand co = case co of
|
||||
"cat lang lexer parser number depth rawtrees unlexer optimize path conversion printer"
|
||||
|
||||
CImport _ -> both "old v s src gfc retain nocf nocheckcirc cflexer noemit o ex prob"
|
||||
"abs cnc res path optimize conversion cat probs noparse"
|
||||
"abs cnc res path optimize conversion cat preproc probs noparse"
|
||||
CRemoveLanguage _ -> none
|
||||
CEmptyState -> none
|
||||
CStripState -> none
|
||||
|
||||
@@ -45,6 +45,7 @@ i, import: i File
|
||||
-optimize select an optimization to override file-defined flags
|
||||
-conversion select parsing method (values strict|nondet)
|
||||
-probs read probabilities from file (format (--# prob) Fun Double)
|
||||
-preproc use a preprocessor on each source file
|
||||
-noparse read nonparsable functions from file (format --# noparse Funs)
|
||||
examples:
|
||||
i English.gf -- ordinary import of Concrete
|
||||
|
||||
Reference in New Issue
Block a user