mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-05-27 17:08:54 -06:00
add semicolon at end of the file
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
--# -path=.:alltenses:prelude:../latin
|
--# -path=.:alltenses:prelude:../latin
|
||||||
|
|
||||||
resource ConstructorsLat = Constructors with (Grammar = GrammarLat) **
|
resource ConstructorsLat = Constructors with (Grammar = GrammarLat) **
|
||||||
open MissingLat in {}
|
open MissingLat in {} ;
|
||||||
|
|||||||
10
src/latin/api/mkMissing.hs
Normal file
10
src/latin/api/mkMissing.hs
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
import PGF
|
||||||
|
import System.Environment
|
||||||
|
|
||||||
|
main =
|
||||||
|
do
|
||||||
|
args <- getArgs -- first one should be pgf file and second one should be the file containing the errors/warnings about missing things
|
||||||
|
pgf <- PGF.readPGF (args !! 0) -- "tmp/Lang.pgf"
|
||||||
|
ms <- readFile (args !! 1) {- "tmp/MissingLat.tmp" -} >>= return . map (last . words) . lines
|
||||||
|
let ts = [PGF.showType [] t | m <- ms, Just t <- [PGF.functionType pgf (PGF.mkCId m)]]
|
||||||
|
putStrLn $ unlines ["oper " ++ f ++ " : " ++ t ++ " = notYet \"" ++ f ++ "\" ;" | (f,t) <- zip ms ts]
|
||||||
18
src/latin/api/mkMissing.sh
Executable file
18
src/latin/api/mkMissing.sh
Executable file
@@ -0,0 +1,18 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
echo "Create tmp dir"
|
||||||
|
mkdir tmp/
|
||||||
|
echo "Remove old file"
|
||||||
|
echo "resource MissingAPILat = {} " > ../MissingAPILat.gf
|
||||||
|
echo "Look for missing functions"
|
||||||
|
# gf -src -i .. -batch TryLat.gf 2>&1 | grep "Warning: no linearization of" | sort -u > tmp/MissingLat.tmp
|
||||||
|
gf -src -i .. -batch TryLat.gf 2>&1 | sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g" | grep -E "constant not found|no linearization of" | sort -u > tmp/MissingLat.tmp
|
||||||
|
echo "Compile grammar"
|
||||||
|
gf -src -make -i .. -D tmp ../LangLat.gf &> /dev/null
|
||||||
|
echo "Create placeholders for missing functions"
|
||||||
|
echo "resource MissingAPILat = open GrammarLat, Prelude in {" > ../MissingAPILat.gf
|
||||||
|
echo "" >> ../MissingAPILat.gf
|
||||||
|
echo "-- temporary definitions to enable the compilation of RGL API" >> ../MissingAPILat.gf
|
||||||
|
runghc mkMissing.hs "tmp/Lang.pgf" "tmp/MissingLat.tmp">> ../MissingAPILat.gf
|
||||||
|
echo "}" >> ../MissingAPILat.gf
|
||||||
|
echo "Cleanup"
|
||||||
|
rm -Rf tmp
|
||||||
Reference in New Issue
Block a user