summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpeb <unknown>2004-04-28 09:37:10 +0000
committerpeb <unknown>2004-04-28 09:37:10 +0000
commit6993118eab6699182738ffcbddf03731ec41e1db (patch)
treeaf15a552881185002592cc9aa8fcbbf95cb7ed1d
parent1bd3dc8433b433cae6937a246045f9e4cbb8bf73 (diff)
peb (28/4-04):
- added directory 'conversions' for grammar conversions - added some grammar printers in 'Custom.hs' - added option 'ghci' in 'Makefile'
-rw-r--r--src/GF/UseGrammar/Custom.hs11
-rw-r--r--src/Makefile21
-rw-r--r--src/Today.hs2
3 files changed, 27 insertions, 7 deletions
diff --git a/src/GF/UseGrammar/Custom.hs b/src/GF/UseGrammar/Custom.hs
index 8cde78c59..03e66837d 100644
--- a/src/GF/UseGrammar/Custom.hs
+++ b/src/GF/UseGrammar/Custom.hs
@@ -37,6 +37,10 @@ import Morphology
-- the cf parsing algorithms
import ChartParser -- or some other CF Parser
+-- grammar conversions -- peb 19/4-04
+-- see also customGrammarPrinter
+import ConvertGrammar
+
import MoreCustom -- either small/ or big/. The one in Small is empty.
import UseIO
@@ -162,6 +166,13 @@ customGrammarPrinter =
,(strCI "canonOpt",showCanonOpt "Lang" . stateGrammarST)
-}
-- add your own grammar printers here
+-- grammar conversions, (peb)
+ ,(strCI "gfc_show", show . grammar2canon . stateGrammarST)
+ ,(strCI "gfc_raw", prRaw . stateGrammarST)
+ ,(strCI "mcfg", prMCFG . convertCanonToMCFG . stateGrammarST)
+ ,(strCI "mcfg_cf", prCF . convertCanonToCF . stateGrammarST)
+ ,(strCI "mcfg_canon", prCanon . convertCanonToMCFG . stateGrammarST)
+ ,(strCI "mcfg_raw", prRaw . convertCanonToMCFG . stateGrammarST)
--- also include printing via grammar2syntax!
]
++ moreCustomGrammarPrinter
diff --git a/src/Makefile b/src/Makefile
index ea5dabebd..899152df7 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -1,11 +1,16 @@
-GHMAKE=ghc
+
+GHMAKE=ghc
+GHCI=ghci
GHCFLAGS=-package lang -package util -fglasgow-exts
GHCOPTFLAGS=-O -package lang -package util -fglasgow-exts
GHCFUDFLAG=-package Fudgets
-GHCINCLUDE=-iapi -icompile -igrammar -iinfra -ishell -isource -icanonical -iuseGrammar -icf -ifor-ghc -iparsing -iparsers
-GHCINCLUDENOFUD=-iapi -icompile -igrammar -iinfra -ishell -isource -icanonical -iuseGrammar -icf -ifor-ghc-nofud -iparsing -iparsers
-GHCINCLUDEGFT=-iapi -icompile -igrammar -iinfra -ishell -isource -icanonical -iuseGrammar -icf -ifor-gft -iparsing -iparsers
-WINDOWSINCLUDE=-ifor-windows -iapi -icompile -igrammar -iinfra -ishell -isource -icanonical -iuseGrammar -icf -iparsing -iparsers
+
+HUGSINCLUDE =.:for-hugs:api:source:canonical:cf:grammar:infra:shell:useGrammar:compile:parsing:conversions:
+BASICINCLUDE =-iapi -icompile -igrammar -iinfra -ishell -isource -icanonical -iuseGrammar -icf -iparsing -iparsers -iconversions
+GHCINCLUDE =-ifor-ghc $(BASICINCLUDE)
+GHCINCLUDENOFUD=-ifor-ghc-nofud $(BASICINCLUDE)
+GHCINCLUDEGFT =-ifor-gft $(BASICINCLUDE)
+WINDOWSINCLUDE =-ifor-windows $(BASICINCLUDE)
all:
make today ; make ghc
@@ -20,6 +25,8 @@ opt:
ghc:
make nofud
+ghci:
+ make nofud-links ; make ghci-nofud
fud:
$(GHMAKE) $(GHCFLAGS) $(GHCINCLUDE) $(GHCFUDFLAG) --make GF.hs -o gf2+ ; strip gf2+ ; mv gf2+ ../bin/
gft:
@@ -39,7 +46,9 @@ shell:
clean:
rm -rf */*.o */*.hi *.o *.hi */*.ghi *.ghi *~ */*~
hugs:
- hugs -P.:for-hugs:api:source:canonical:cf:grammar:infra:shell:useGrammar:compile:parsing: GF
+ hugs -E"open -a emacs" -P$(HUGSINCLUDE)
+ghci-nofud:
+ $(GHCI) $(GHCFLAGS) $(GHCINCLUDENOFUD)
today:
runhugs util/MkToday
javac:
diff --git a/src/Today.hs b/src/Today.hs
index c74a9df8b..49afb85f8 100644
--- a/src/Today.hs
+++ b/src/Today.hs
@@ -1 +1 @@
-module Today where today = "Tue Apr 27 22:17:25 CEST 2004"
+module Today where today = "Ons Apr 28 09:03:36 CEST 2004"