mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-05 17:22:51 -06:00
fixed pre expressions, parsing {} patterns, and the path in resource Make.hs
This commit is contained in:
@@ -198,7 +198,8 @@ unlexer abstr ls =
|
|||||||
-- | Runs the gf executable in compile mode with the given arguments.
|
-- | Runs the gf executable in compile mode with the given arguments.
|
||||||
run_gfc :: [String] -> IO ()
|
run_gfc :: [String] -> IO ()
|
||||||
run_gfc args =
|
run_gfc args =
|
||||||
do let args' = ["-batch","-gf-lib-path=."] ++ filter (not . null) args ++ ["+RTS"] ++ rts_flags ++ ["-RTS"]
|
do let args' = ["-batch"] ++ filter (not . null) args ++ ["+RTS"] ++ rts_flags ++ ["-RTS"]
|
||||||
|
--- do let args' = ["-batch","-gf-lib-path=."] ++ filter (not . null) args ++ ["+RTS"] ++ rts_flags ++ ["-RTS"] --- why path? AR
|
||||||
putStrLn $ "Running: " ++ default_gf ++ " " ++ unwords (map showArg args')
|
putStrLn $ "Running: " ++ default_gf ++ " " ++ unwords (map showArg args')
|
||||||
e <- rawSystem default_gf args'
|
e <- rawSystem default_gf args'
|
||||||
case e of
|
case e of
|
||||||
|
|||||||
@@ -34,8 +34,16 @@ elisEl = pre { "el" ; "l'" / vocal } ;
|
|||||||
elisLa = pre { "la" ; "l'" / vocalForta } ;
|
elisLa = pre { "la" ; "l'" / vocalForta } ;
|
||||||
elisEm = pre { "em" ; "m'" / vocal } ;
|
elisEm = pre { "em" ; "m'" / vocal } ;
|
||||||
elisEt = pre { "et" ; "t'" / vocal } ;
|
elisEt = pre { "et" ; "t'" / vocal } ;
|
||||||
|
|
||||||
|
-- AR after pre syntax change 25/5/2009
|
||||||
elisEs = pre {
|
elisEs = pre {
|
||||||
pre { "es" ; "s'" / vocal} ;
|
vocal => "s'" ;
|
||||||
"se" / strs { "s" } } ;
|
"s" => "se" ;
|
||||||
|
_ => "es"
|
||||||
|
} ;
|
||||||
|
|
||||||
|
--elisEs = pre {
|
||||||
|
-- pre { "es" ; "s'" / vocal} ;
|
||||||
|
-- "se" / strs { "s" } } ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -182,7 +182,10 @@ oper
|
|||||||
} ;
|
} ;
|
||||||
|
|
||||||
elisPoss : Str -> Str = \s ->
|
elisPoss : Str -> Str = \s ->
|
||||||
pre {s + "a" ; s + "on" / voyelle} ;
|
pre {
|
||||||
|
voyelle => s + "on" ;
|
||||||
|
_ => s + "a"
|
||||||
|
} ;
|
||||||
|
|
||||||
|
|
||||||
--2 Determiners
|
--2 Determiners
|
||||||
|
|||||||
@@ -375,8 +375,8 @@ param Place = attr | indep ;
|
|||||||
param Size = nom | sgg | plg ;
|
param Size = nom | sgg | plg ;
|
||||||
--param Gend = masc | fem | neut ;
|
--param Gend = masc | fem | neut ;
|
||||||
oper mille : Size => Str = table {
|
oper mille : Size => Str = table {
|
||||||
{nom} => "тысяча" ;
|
nom => "тысяча" ;
|
||||||
{sgg} => "тысячи" ;
|
sgg => "тысячи" ;
|
||||||
_ => "тысяч"} ;
|
_ => "тысяч"} ;
|
||||||
|
|
||||||
oper gg : Str -> Gender => Str = \s -> table {_ => s} ;
|
oper gg : Str -> Gender => Str = \s -> table {_ => s} ;
|
||||||
|
|||||||
@@ -483,6 +483,7 @@ Patt2
|
|||||||
| '#' Ident '.' Ident { PM $2 $4 }
|
| '#' Ident '.' Ident { PM $2 $4 }
|
||||||
| '_' { PW }
|
| '_' { PW }
|
||||||
| Ident { PV $1 }
|
| Ident { PV $1 }
|
||||||
|
| '{' Ident '}' { PC $2 [] }
|
||||||
| Ident '.' Ident { PP $1 $3 [] }
|
| Ident '.' Ident { PP $1 $3 [] }
|
||||||
| Integer { PInt $1 }
|
| Integer { PInt $1 }
|
||||||
| Double { PFloat $1 }
|
| Double { PFloat $1 }
|
||||||
|
|||||||
Reference in New Issue
Block a user