mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-24 03:52:50 -06:00
fixed the mysterious "file..gfc" error
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -1,4 +1,4 @@
|
|||||||
GF=gf
|
GF=gf -s
|
||||||
RTS=+RTS -M800M -K100M
|
RTS=+RTS -M800M -K100M
|
||||||
RTSS=+RTS -M1000M -K100M
|
RTSS=+RTS -M1000M -K100M
|
||||||
|
|
||||||
@@ -12,7 +12,7 @@ GFC=$(GFCC) -src
|
|||||||
|
|
||||||
# comment the first and uncomment the second in Windows
|
# comment the first and uncomment the second in Windows
|
||||||
GFCP=$(GFC) -preproc=./mkPresent
|
GFCP=$(GFC) -preproc=./mkPresent
|
||||||
GFCCP=$(GFCC) -preproc=./mkPresent -p
|
GFCCP=$(GFCC) -preproc=./mkPresent
|
||||||
#GFCP=$(GFC) -preproc=mkPresent
|
#GFCP=$(GFC) -preproc=mkPresent
|
||||||
|
|
||||||
|
|
||||||
@@ -45,6 +45,7 @@ alltenses:
|
|||||||
cp -p */*.gfc */*.gfr ../alltenses
|
cp -p */*.gfc */*.gfr ../alltenses
|
||||||
touch api/Constructors.gf
|
touch api/Constructors.gf
|
||||||
$(GFCC) api/Syntax???.gf
|
$(GFCC) api/Syntax???.gf
|
||||||
|
cp -p api/Constructors*.gfc api/Constructors*.gfr ../alltenses
|
||||||
cp -p api/Syntax*.gfc api/Syntax*.gfr ../alltenses
|
cp -p api/Syntax*.gfc api/Syntax*.gfr ../alltenses
|
||||||
|
|
||||||
|
|
||||||
@@ -53,7 +54,7 @@ langs:
|
|||||||
echo "s ;; pm | wf langs.gfcm" | $(GFCA) -path=alltenses:prelude ../alltenses/Lang???.gfc $(RTSS)
|
echo "s ;; pm | wf langs.gfcm" | $(GFCA) -path=alltenses:prelude ../alltenses/Lang???.gfc $(RTSS)
|
||||||
|
|
||||||
api:
|
api:
|
||||||
$(GFCC) api/Constructors???.gf
|
# $(GFCC) api/Constructors???.gf
|
||||||
$(GFCC) api/Combinators???.gf
|
$(GFCC) api/Combinators???.gf
|
||||||
$(GFCC) api/Symbolic???.gf
|
$(GFCC) api/Symbolic???.gf
|
||||||
cp -p api/*.gfc api/*.gfr ../api
|
cp -p api/*.gfc api/*.gfr ../api
|
||||||
@@ -67,13 +68,14 @@ present:
|
|||||||
$(GFCP) german/German.gf
|
$(GFCP) german/German.gf
|
||||||
$(GFCP) italian/Italian.gf
|
$(GFCP) italian/Italian.gf
|
||||||
$(GFCP) norwegian/Norwegian.gf
|
$(GFCP) norwegian/Norwegian.gf
|
||||||
$(GFCP) russian/LangRus.gf
|
$(GFCP) russian/Russian.gf
|
||||||
$(GFCP) spanish/Spanish.gf
|
$(GFCP) spanish/Spanish.gf
|
||||||
$(GFCP) swedish/Swedish.gf
|
$(GFCP) swedish/Swedish.gf
|
||||||
$(GFCP) common/ConstructX.gf
|
$(GFCP) common/ConstructX.gf
|
||||||
mv */*.gfc */*.gfr ../present
|
mv */*.gfc */*.gfr ../present
|
||||||
touch api/Constructors.gf
|
touch api/Constructors.gf
|
||||||
$(GFCCP) -path=api:present:prelude api/Syntax???.gf
|
$(GFCCP) -path=api:present:prelude api/Syntax???.gf
|
||||||
|
mv api/Constructors*.gfc api/Constructors*.gfr ../present
|
||||||
mv api/Syntax*.gfc api/Syntax*.gfr ../present
|
mv api/Syntax*.gfc api/Syntax*.gfr ../present
|
||||||
|
|
||||||
mathematical:
|
mathematical:
|
||||||
@@ -92,7 +94,7 @@ multimodal:
|
|||||||
mv multimodal/*.gfc ../multimodal
|
mv multimodal/*.gfc ../multimodal
|
||||||
|
|
||||||
compiled:
|
compiled:
|
||||||
cd .. ; tar cvfz compiled.tgz alltenses/ mathematical/ multimodal/ present/ prelude/*.gf?
|
cd .. ; tar cfz compiled.tgz alltenses/ mathematical/ multimodal/ present/ prelude/*.gf?
|
||||||
|
|
||||||
treebank:
|
treebank:
|
||||||
gf <mkTreebank.gfs
|
gf <mkTreebank.gfs
|
||||||
|
|||||||
@@ -1,5 +0,0 @@
|
|||||||
--# -path=.:present:mathematical:prelude
|
|
||||||
|
|
||||||
resource SymbolicDan = Symbolic with
|
|
||||||
(Symbol = SymbolDan),
|
|
||||||
(Grammar = GrammarDan) ;
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
--# -path=.:present:mathematical:prelude
|
|
||||||
|
|
||||||
resource SymbolicRus = Symbolic with
|
|
||||||
(Symbol = SymbolRus),
|
|
||||||
(Grammar = GrammarRus) ;
|
|
||||||
@@ -3,8 +3,8 @@ incomplete concrete PredicationI of Predication = Cat ** open ParamX, Lang in {
|
|||||||
flags optimize = all_subs ;
|
flags optimize = all_subs ;
|
||||||
|
|
||||||
lin
|
lin
|
||||||
PosCl cl = UseCl TPres ASimul PPos cl ;
|
PosCl cl = UseCl Lang.TPres ASimul PPos cl ;
|
||||||
NegCl cl = UseCl TPres ASimul PNeg cl ;
|
NegCl cl = UseCl Lang.TPres ASimul PNeg cl ;
|
||||||
|
|
||||||
--2 Predication patterns.
|
--2 Predication patterns.
|
||||||
|
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ lin
|
|||||||
|
|
||||||
SymbS sy = sy ;
|
SymbS sy = sy ;
|
||||||
|
|
||||||
SymbNum sy = sy ;
|
SymbNum sy = {s = sy.s ; n = Sg} ;
|
||||||
SymbOrd sy = {s = sy.s ++ "th"} ;
|
SymbOrd sy = {s = sy.s ++ "th"} ;
|
||||||
|
|
||||||
lincat
|
lincat
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ lin
|
|||||||
|
|
||||||
SymbS sy = {s = \\_ => sy.s} ;
|
SymbS sy = {s = \\_ => sy.s} ;
|
||||||
|
|
||||||
SymbNum n = {s = n.s} ;
|
SymbNum n = {s = n.s ; n = Pl} ;
|
||||||
SymbOrd n = {s = \\_ => n.s ++ "."} ;
|
SymbOrd n = {s = \\_ => n.s ++ "."} ;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -82,12 +82,13 @@ concrete NounRus of Noun = CatRus ** open ResRus, Prelude, MorphoRus in {
|
|||||||
-- so just leave a decimal representation, without case-suffixes:
|
-- so just leave a decimal representation, without case-suffixes:
|
||||||
NumInt i = {s = table { _ => table {_ => i.s } } } ;
|
NumInt i = {s = table { _ => table {_ => i.s } } } ;
|
||||||
|
|
||||||
-- OrdInt n = case n of {
|
OrdInt n = variants {} ; ---- TODO
|
||||||
|
-- case n of {
|
||||||
-- 0|2|6 => (uy_oj_EndDecl n.s) ;
|
-- 0|2|6 => (uy_oj_EndDecl n.s) ;
|
||||||
-- 3 => (ti_j_EndDecl n.s) ;
|
-- 3 => (ti_j_EndDecl n.s) ;
|
||||||
-- _ => uy_j_EndDecl n.s } ;
|
-- _ => uy_j_EndDecl n.s } ;
|
||||||
|
|
||||||
-- OrdNumeral numeral =
|
OrdNumeral numeral = variants {} ; ---- TODO
|
||||||
-- {s = \\ af => (uy_j_EndDecl (numeral.s ! caseAF af ! genAF af)).s!af} ;
|
-- {s = \\ af => (uy_j_EndDecl (numeral.s ! caseAF af ! genAF af)).s!af} ;
|
||||||
|
|
||||||
NumNumeral n = n ;
|
NumNumeral n = n ;
|
||||||
|
|||||||
@@ -148,7 +148,7 @@ checkCompleteGrammar abs cnc = do
|
|||||||
AbsFun (Yes _) _ -> case lookupIdent c js of
|
AbsFun (Yes _) _ -> case lookupIdent c js of
|
||||||
Ok _ -> return js
|
Ok _ -> return js
|
||||||
_ -> do
|
_ -> do
|
||||||
checkWarn $ "Warning: no linearization of" +++ prt c
|
checkWarn $ "WARNING: no linearization of" +++ prt c
|
||||||
return js
|
return js
|
||||||
AbsCat (Yes _) _ -> case lookupIdent c js of
|
AbsCat (Yes _) _ -> case lookupIdent c js of
|
||||||
Ok (AnyInd _ _) -> return js
|
Ok (AnyInd _ _) -> return js
|
||||||
@@ -475,7 +475,7 @@ inferLType gr trm = case trm of
|
|||||||
|
|
||||||
K s -> do
|
K s -> do
|
||||||
if elem ' ' s
|
if elem ' ' s
|
||||||
then checkWarn ("Warning: space in token \"" ++ s ++
|
then checkWarn ("WARNING: space in token \"" ++ s ++
|
||||||
"\". Lexical analysis may fail.")
|
"\". Lexical analysis may fail.")
|
||||||
else return ()
|
else return ()
|
||||||
return (trm, typeStr)
|
return (trm, typeStr)
|
||||||
@@ -492,6 +492,11 @@ inferLType gr trm = case trm of
|
|||||||
Glue s1 s2 ->
|
Glue s1 s2 ->
|
||||||
check2 (flip justCheck typeStr) Glue s1 s2 typeStr ---- typeTok
|
check2 (flip justCheck typeStr) Glue s1 s2 typeStr ---- typeTok
|
||||||
|
|
||||||
|
---- hack from Rename.identRenameTerm, to live with files with naming conflicts 18/6/2007
|
||||||
|
Strs (Cn (IC "#conflict") : ts) -> do
|
||||||
|
checkWarn ("WARNING: unresolved constant, could be any of" +++ unwords (map prt ts))
|
||||||
|
infer $ head ts
|
||||||
|
|
||||||
Strs ts -> do
|
Strs ts -> do
|
||||||
ts' <- mapM (\t -> justCheck t typeStr) ts
|
ts' <- mapM (\t -> justCheck t typeStr) ts
|
||||||
return (Strs ts', typeStrs)
|
return (Strs ts', typeStrs)
|
||||||
@@ -696,7 +701,7 @@ checkLType env trm typ0 = do
|
|||||||
ps <- checkErr $ testOvershadow ps0 vs
|
ps <- checkErr $ testOvershadow ps0 vs
|
||||||
if null ps
|
if null ps
|
||||||
then return ()
|
then return ()
|
||||||
else checkWarn $ "Warning: patterns never reached:" +++
|
else checkWarn $ "WARNING: patterns never reached:" +++
|
||||||
concat (intersperse ", " (map prt ps))
|
concat (intersperse ", " (map prt ps))
|
||||||
|
|
||||||
_ -> return () -- happens with variable types
|
_ -> return () -- happens with variable types
|
||||||
|
|||||||
@@ -217,7 +217,7 @@ compileOne opts env@((_,srcgr,cancgr0,eenv),_) file = do
|
|||||||
|
|
||||||
b <- ioeIO $ doesFileExist file
|
b <- ioeIO $ doesFileExist file
|
||||||
if not b
|
if not b
|
||||||
then compileOne opts env $ gfcFile (init (init file))
|
then compileOne opts env $ gfcFile $ unsuffixFile file
|
||||||
else do
|
else do
|
||||||
|
|
||||||
sm0 <- putpOpt ("- parsing" +++ file) ("- compiling" +++ file ++ "... ") $
|
sm0 <- putpOpt ("- parsing" +++ file) ("- compiling" +++ file ++ "... ") $
|
||||||
|
|||||||
@@ -103,8 +103,9 @@ renameIdentTerm env@(act,imps) t =
|
|||||||
[] -> alt c ("constant not found:" +++ prt c)
|
[] -> alt c ("constant not found:" +++ prt c)
|
||||||
fs -> case nub [f c | f <- fs] of
|
fs -> case nub [f c | f <- fs] of
|
||||||
[tr] -> return tr
|
[tr] -> return tr
|
||||||
ts@(tr:_) ->
|
ts -> return $ Strs $ (cnIC "#conflict") : reverse ts
|
||||||
Bad $ "conflicting imports:" +++ unwords (map prt ts)
|
-- a warning will be generated in CheckGrammar, and the head returned
|
||||||
|
-- in next V: Bad $ "conflicting imports:" +++ unwords (map prt ts)
|
||||||
|
|
||||||
|
|
||||||
--- | would it make sense to optimize this by inlining?
|
--- | would it make sense to optimize this by inlining?
|
||||||
|
|||||||
Reference in New Issue
Block a user