SWIProlog can't not emit '.'.

I would like the GNU Prolog and SWI Prolog versions to be compatible, if
possible.

SWI has bigints, GNU doesn't, so that's a wrinkle...
This commit is contained in:
sforman 2023-08-02 22:38:04 -07:00
parent ee4c3bc9b6
commit 97602ade8d
4 changed files with 4 additions and 4 deletions

View File

@ -87,5 +87,5 @@ stdin_to_codes(Code, [Code|Codes]) :-
:- initialization(( :- initialization((
stdin_to_codes(Codes), stdin_to_codes(Codes),
text_to_expression(Codes, Expr), text_to_expression(Codes, Expr),
write_term(Expr, [quoted(true)]), print('\n') write_term(Expr, [quoted(true)]), print('.\n')
)). )).

View File

@ -17,7 +17,7 @@ codes_to_stream([Code|Codes], Stream) :-
codes_to_stream([], _). codes_to_stream([], _).
:- initialization(( :- initialization((
read_term(AST, [end_of_term(eof)]), read_term(AST, []),
format_joy_terms(AST, Codes, []), format_joy_terms(AST, Codes, []),
codes_to_stream(Codes, user_output), print('\n') codes_to_stream(Codes, user_output), print('\n')
)). )).

View File

@ -66,8 +66,8 @@ combo(loop, [list(B), bool(true)|S], S, Ei, Eo) :- append(B, [list(B), symbol(l
:- initialization(( :- initialization((
read_term(AST, [end_of_term(eof)]), read_term(AST, []),
thun(AST, [], Stack), thun(AST, [], Stack),
write_term(Stack, [quoted(true)]), print('\n') write_term(Stack, [quoted(true)]), print('.\n')
)). )).