Experiment with porting SGML to YAP, and trying to preserve SWI code as much

as possible.
This commit is contained in:
Vitor Santos Costa
2009-03-13 19:39:06 +00:00
parent 754f00d311
commit d6a06fe092
260 changed files with 31894 additions and 0 deletions

35
packages/sgml/RDF/rdf-parser Executable file
View File

@@ -0,0 +1,35 @@
#!/bin/bash
#
# This is not the normal parser, just the front-end for the CGI interface.
# The real CGI stuff is written in Prolog in the file online.pl. The
# request is in online.html
#
# The RDF parser itself is just a Prolog library. See rdf2pl.{html,pdf}.
base=@BASEDIR@
tmp=/tmp/rdf-parser-$$
export ERROR_FILE=$tmp
ulimit -t 20 # seconds CPU time limit
function error()
{ cat << _EOM_
Content-type: text/plain
Sorry, an internal error occurred. For details, see below.
_EOM_
cat $tmp
rm -r $tmp
exit 0
}
cd $base > $tmp 2>&1
@SWI@ -f none -F none -t halt \
-g "load_files(online,[silent(true)]),go" 2>$tmp
case $? in
0) rm -f $tmp
exit 0 ;;
*) error ;;
esac