summaryrefslogtreecommitdiff
path: root/src-3.0/GF/Compile/GFCCtoJS.hs
diff options
context:
space:
mode:
authorkrasimir <krasimir@chalmers.se>2008-05-30 11:15:33 +0000
committerkrasimir <krasimir@chalmers.se>2008-05-30 11:15:33 +0000
commit8bb0c32a9cf2cbad0375ab5886b7f2be37109477 (patch)
tree2290b07d391a1da4e94ee367b445a6b2f64ca2cd /src-3.0/GF/Compile/GFCCtoJS.hs
parent1172539a9544ed999c565053b79cf6a30ec14de4 (diff)
replace GFCC with PGF in (almost) all places
Diffstat (limited to 'src-3.0/GF/Compile/GFCCtoJS.hs')
-rw-r--r--src-3.0/GF/Compile/GFCCtoJS.hs14
1 files changed, 7 insertions, 7 deletions
diff --git a/src-3.0/GF/Compile/GFCCtoJS.hs b/src-3.0/GF/Compile/GFCCtoJS.hs
index 1c24627a3..024de7273 100644
--- a/src-3.0/GF/Compile/GFCCtoJS.hs
+++ b/src-3.0/GF/Compile/GFCCtoJS.hs
@@ -1,4 +1,4 @@
-module GF.Compile.GFCCtoJS (gfcc2js) where
+module GF.Compile.GFCCtoJS (pgf2js) where
import PGF.CId
import PGF.Data
@@ -16,14 +16,14 @@ import qualified Data.Array as Array
import Data.Maybe (fromMaybe)
import qualified Data.Map as Map
-gfcc2js :: GFCC -> String
-gfcc2js gfcc =
+pgf2js :: PGF -> String
+pgf2js pgf =
encodeUTF8 $ JS.printTree $ JS.Program [JS.ElStmt $ JS.SDeclOrExpr $ JS.Decl [JS.DInit (JS.Ident n) grammar]]
where
- n = prCId $ absname gfcc
- as = abstract gfcc
- cs = Map.assocs (concretes gfcc)
- start = M.lookStartCat gfcc
+ n = prCId $ absname pgf
+ as = abstract pgf
+ cs = Map.assocs (concretes pgf)
+ start = M.lookStartCat pgf
grammar = new "GFGrammar" [js_abstract, js_concrete]
js_abstract = abstract2js start as
js_concrete = JS.EObj $ map (concrete2js start n) cs