This commit is contained in:
Vitor Santos Costa
2018-02-25 00:29:08 +00:00
parent a073b663ae
commit 530246688c
11 changed files with 91 additions and 66 deletions

View File

@@ -183,14 +183,21 @@ ready(Self, Line ) :-
errors( Self, Text ) :-
setup_call_cleanup(
open_events( Self, Text, Stream),
clauses(Self, Stream),
goals(Self, Stream),
close_events( Self )
).
clauses(Self, Stream) :-
repeat,
read_clause(Stream, Cl, [term_position(_Pos), syntax_errors(fail)] ),
command( Self, Cl ),
% command( Self, Cl ),
Cl == end_of_file,
!.
goals(Self, Stream) :-
repeat,
read_term(Stream, Cl, [term_position(_Pos), syntax_errors(fail)] ),
% command( Self, Cl ),
Cl == end_of_file,
!.

View File

@@ -113,6 +113,7 @@ class YAPInputSplitter(InputSplitter):
return False
self.errors = []
self.yapeng.mgoal(errors(self, line),"user")
print(self.errors)
return self.errors != []