forked from GitHub/gf-core
peb (28/4-04):
- added directory 'conversions' for grammar conversions - added some grammar printers in 'Custom.hs' - added option 'ghci' in 'Makefile'
This commit is contained in:
@@ -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
|
||||
|
||||
21
src/Makefile
21
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:
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user