linux backport
file exists system predicate $source_file -> $user source hide and make system preds fix check_head_and_body user_expansion never fails goal expansion is controlled b dynamic procedure add must_be_of_type predicate_indicator fix neat_call, debug flag is user controlled use simplecudd, not ptoblogbdd compile all of myddas fx junk in file_name fix warnings use common file opening struct and funds avoid pairs module fix db queues
This commit is contained in:
32
regression/parse/run
Normal file
32
regression/parse/run
Normal file
@@ -0,0 +1,32 @@
|
||||
#!/usr/local/bin/yap
|
||||
#.
|
||||
#
|
||||
#
|
||||
|
||||
:- use_module(library(system)).
|
||||
|
||||
main :-
|
||||
source_dir( Dir ),
|
||||
directory_files(Dir/input/parse,[_,_|Files]),
|
||||
member( File, Files ),
|
||||
atom_concat(test_, Number, File),
|
||||
run( File ),
|
||||
match( File ),
|
||||
fail.
|
||||
main.
|
||||
|
||||
run(File) :-
|
||||
open( Dir/in/File, read, Stream ),
|
||||
tmp_dir( Tmp ),
|
||||
open( Tmp/File, Write, Output ),
|
||||
parse( Stream, Output ).
|
||||
|
||||
parse( Stream, Output ) :-
|
||||
catch( take(Stream, Term ), ERR, TERM = err__(ERR) ),
|
||||
show( Stream, Output, Term ).
|
||||
|
||||
take( Stream, Term ) :-
|
||||
repeat,
|
||||
read_term( Stream, Term ),
|
||||
( Term == end_of_file -> ! ; true ).
|
||||
|
Reference in New Issue
Block a user