diff options
| author | aarne <aarne@chalmers.se> | 2011-07-21 08:25:04 +0000 |
|---|---|---|
| committer | aarne <aarne@chalmers.se> | 2011-07-21 08:25:04 +0000 |
| commit | 848373e29e6d16db50b68e8835a474dd14b5ab9d (patch) | |
| tree | 9d53226ea5ab2d62fd3500f8e475db9685c48d7b /src | |
| parent | 29e40b92e149abd3f187f9fae00d5a5580000474 (diff) | |
GenIP, GenRP in Extra and any_Quant in ExtraEng
Diffstat (limited to 'src')
| -rw-r--r-- | src/compiler/GF/Compile/Rename.hs | 9 | ||||
| -rw-r--r-- | src/compiler/GF/Grammar/Parser.y | 2 | ||||
| -rw-r--r-- | src/runtime/javascript/minibar/phrasebook.html | 4 |
3 files changed, 13 insertions, 2 deletions
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 <a href="http://www.grammaticalframework.org/examples/phrasebook/doc-phraseb <script type="text/JavaScript"> 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 } |
