diff --git a/lib/src/abstract/Extra.gf b/lib/src/abstract/Extra.gf index f5c6bc868..11a1979e1 100644 --- a/lib/src/abstract/Extra.gf +++ b/lib/src/abstract/Extra.gf @@ -8,6 +8,8 @@ abstract Extra = Cat ** { fun GenNP : NP -> Quant ; -- this man's + GenIP : IP -> IQuant ; -- whose + GenRP : Num -> CN -> RP ; -- whose car ComplBareVS : VS -> S -> VP ; -- know you go StrandRelSlash : RP -> ClSlash -> RCl ; -- that he lives in diff --git a/lib/src/english/ExtraEng.gf b/lib/src/english/ExtraEng.gf index e33c160c2..09d181c3c 100644 --- a/lib/src/english/ExtraEng.gf +++ b/lib/src/english/ExtraEng.gf @@ -1,8 +1,18 @@ concrete ExtraEng of ExtraEngAbs = CatEng ** - open ResEng, Coordination, Prelude, MorphoEng in { + open ResEng, Coordination, Prelude, MorphoEng, ParadigmsEng in { lin GenNP np = {s = \\_,_ => np.s ! npGen ; sp = \\_,_,_ => np.s ! npGen} ; + GenIP ip = {s = \\_ => ip.s ! NCase Gen} ; + GenRP nu cn = { + s = \\c => "whose" ++ nu.s ! Nom ++ + case c of { + RC _ (NCase Gen) => cn.s ! nu.n ! Gen ; + _ => cn.s ! nu.n ! Nom + } ; + a = RAg (agrP3 Sg) + } ; + ComplBareVS v s = insertObj (\\_ => s.s) (predV v) ; StrandRelSlash rp slash = { @@ -50,6 +60,7 @@ concrete ExtraEng of ExtraEngAbs = CatEng ** } ; each_Det = mkDeterminer Sg "each" ; + any_Quant = mkQuant "any" "any" ; -- for VP conjunction diff --git a/lib/src/english/ExtraEngAbs.gf b/lib/src/english/ExtraEngAbs.gf index ed5931893..f2d6e9752 100644 --- a/lib/src/english/ExtraEngAbs.gf +++ b/lib/src/english/ExtraEngAbs.gf @@ -11,6 +11,7 @@ abstract ExtraEngAbs = Extra - [ProDrop] ** { that_RP : RP ; -- "that" as a relational pronoun (IdRP is "which" / "who") each_Det : Det ; + any_Quant : Quant ; -- infinitive without to diff --git a/src/compiler/GF/Compile/Rename.hs b/src/compiler/GF/Compile/Rename.hs index 5329a45aa..c8bf8cdd9 100644 --- a/src/compiler/GF/Compile/Rename.hs +++ b/src/compiler/GF/Compile/Rename.hs @@ -24,6 +24,7 @@ module GF.Compile.Rename ( renameSourceTerm, + renameSourceJudgement, renameModule ) where @@ -50,6 +51,14 @@ renameSourceTerm g m t = do status <- buildStatus g m mo renameTerm status [] t +-- | this gives top-level access to renaming term input in the cj command +renameSourceJudgement :: SourceGrammar -> Ident -> (Ident,Info) -> Check (Ident,Info) +renameSourceJudgement g m (i,t) = do + mo <- checkErr $ lookupModule g m + status <- buildStatus g m mo + t2 <- renameInfo status m i t + return (i,t2) + renameModule :: [SourceModule] -> SourceModule -> Check SourceModule renameModule ms (name,mo) = checkIn (text "renaming module" <+> ppIdent name) $ do let js1 = jments mo diff --git a/src/compiler/GF/Grammar/Parser.y b/src/compiler/GF/Grammar/Parser.y index 969aa25c3..e070f939d 100644 --- a/src/compiler/GF/Grammar/Parser.y +++ b/src/compiler/GF/Grammar/Parser.y @@ -5,6 +5,7 @@ module GF.Grammar.Parser , pModDef , pModHeader , pExp + , pTopDef ) where import GF.Infra.Ident @@ -20,6 +21,7 @@ import GF.Compile.Update (buildAnyTree) } %name pModDef ModDef +%name pTopDef TopDef %partial pModHeader ModHeader %name pExp Exp diff --git a/src/runtime/javascript/minibar/phrasebook.html b/src/runtime/javascript/minibar/phrasebook.html index 1bd45857d..9a8649d2b 100644 --- a/src/runtime/javascript/minibar/phrasebook.html +++ b/src/runtime/javascript/minibar/phrasebook.html @@ -27,9 +27,9 @@ see var online_options={ - grammars_url: "http://www.grammaticalframework.org/grammars/", + // grammars_url: "http://www.grammaticalframework.org/grammars/", //grammars_url: "http://tournesol.cs.chalmers.se:41296/grammars", -//grammars_url: "http://localhost:41296/grammars", +grammars_url: "http://localhost:41296/grammars/", grammar_list: ["Phrasebook.pgf"], // leave undefined to get list from server }