mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-19 11:23:46 +00:00
library/mercury_term_lexer.m:
library/mercury_term_parser.m:
As above.
NEWS:
Announce the change.
browser/interactive_query.m:
compiler/analysis.file.m:
compiler/fact_table.m:
compiler/make.module_dep_file.m:
compiler/parse_module.m:
compiler/parse_tree_out_term.m:
compiler/recompilation.used_file.m:
library/MODULES_DOC:
library/char.m:
library/integer.m:
library/io.m:
library/library.m:
library/ops.m:
library/term.m:
library/term_io.m:
mdbcomp/trace_counts.m:
tests/hard_coded/impl_def_lex.m:
tests/hard_coded/impl_def_lex_string.m:
tests/hard_coded/lco_pack_args_3.m:
tests/hard_coded/lexer_bigint.m:
tests/hard_coded/lexer_ints.m:
tests/hard_coded/lexer_zero.m:
tests/hard_coded/parse_number_from_string.m:
tests/valid_seq/nested_module_bug.m:
Conform to the change.
34 lines
913 B
Mathematica
34 lines
913 B
Mathematica
%---------------------------------------------------------------------------%
|
|
% vim: ts=4 sw=4 et ft=mercury
|
|
%---------------------------------------------------------------------------%
|
|
%
|
|
% Test the lexer reads implementation-defined literals correctly.
|
|
|
|
:- module impl_def_lex.
|
|
:- interface.
|
|
|
|
:- import_module io.
|
|
|
|
:- pred main(io::di, io::uo) is det.
|
|
|
|
%---------------------------------------------------------------------------%
|
|
%---------------------------------------------------------------------------%
|
|
|
|
:- implementation.
|
|
|
|
:- import_module mercury_term_lexer.
|
|
|
|
main(!IO) :-
|
|
get_token_list(Tokens, !IO),
|
|
write_list(Tokens, !IO).
|
|
|
|
:- pred write_list(token_list::in, io::di, io::uo) is det.
|
|
|
|
write_list(token_nil, !IO).
|
|
write_list(token_cons(Token, Context, List), !IO) :-
|
|
io.write(Token, !IO),
|
|
io.write_char(' ', !IO),
|
|
io.write(Context, !IO),
|
|
io.nl(!IO),
|
|
write_list(List, !IO).
|