mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-05-27 08:58:55 -06:00
added scripts to regenerate missinglat
This commit is contained in:
@@ -1,18 +0,0 @@
|
||||
#!/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
|
||||
18
src/latin/mkMissing.sh
Executable file
18
src/latin/mkMissing.sh
Executable file
@@ -0,0 +1,18 @@
|
||||
#!/bin/sh
|
||||
echo "Create tmp dir"
|
||||
mkdir tmp/
|
||||
echo "Remove old file"
|
||||
echo "resource MissingLat = {} " > MissingLat.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 ../api/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 -D tmp LangLat.gf &> /dev/null
|
||||
echo "Create placeholders for missing functions"
|
||||
echo "resource MissingLat = open GrammarLat, Prelude in {" > MissingLat.gf
|
||||
echo "" >> MissingLat.gf
|
||||
echo "-- temporary definitions to enable the compilation of RGL API" >> MissingLat.gf
|
||||
runghc mkMissing.hs "tmp/Lang.pgf" "tmp/MissingLat.tmp">> MissingLat.gf
|
||||
echo "}" >> MissingLat.gf
|
||||
echo "Cleanup"
|
||||
rm -Rf tmp
|
||||
Reference in New Issue
Block a user