#include "basix/mmx_syntax.hpp"
#include "basix/parse_tools.hpp"
Go to the source code of this file.
#define ADD_POS | ( | z | ) | { pos += z; } |
Definition at line 39 of file mmx_lexer.cpp.
Referenced by mmx::mmx_lex().
#define begin_line (obj->lex_begin_line) |
Definition at line 33 of file mmx_lexer.cpp.
#define file (obj->lex_file_name) |
Definition at line 35 of file mmx_lexer.cpp.
#define INC_LINE { pos++; line++; begin_line = pos; } |
Definition at line 40 of file mmx_lexer.cpp.
Referenced by mmx::mmx_lex().
#define INC_POS { pos++; } |
Definition at line 38 of file mmx_lexer.cpp.
Referenced by mmx::mmx_lex(), and mmx::test_keyword().
#define input (obj->lex_input_number) |
Definition at line 36 of file mmx_lexer.cpp.
#define is_alpha | ( | c | ) |
((((c)>='0') && ((c)<='9')) || \ (((c)>='A') && ((c)<='Z')) || \ (((c)>='a') && ((c)<='z')) || \ (((c)=='_') || ((c)=='?') || ((c)=='$')))
Definition at line 58 of file mmx_lexer.cpp.
Referenced by mmx::as_texmacs(), mmx::mmx_lex(), and mmx::test_keyword().
#define keyword | ( | c, | |||
k, | |||||
code | ) | if ((s[pos]==c) && test_keyword(k,obj)) produce (code); |
Definition at line 55 of file mmx_lexer.cpp.
#define line (obj->lex_line) |
Definition at line 29 of file mmx_lexer.cpp.
Referenced by mmx::read_line(), and mmx::underlined().
#define n (obj->lex_length) |
Definition at line 21 of file mmx_lexer.cpp.
Referenced by mmx::_mul_add(), mmx::append(), composed_routine_rep::apply(), mmx::as_lisp(), mmx::as_math(), mmx::as_vector(), mmx::binary_map(), mmx::binary_map_optimized(), mmx::binary_map_scalar(), mmx::binary_test(), mmx::composite_port(), mmx::cons(), solve_vector_lde_op::diff_op(), mmx::exact_hash(), mmx::exec(), mmx::extract_mod(), mmx::file_test(), mmx::find(), mmx::flatten(), mmx::follow_link(), mmx::hash(), mmx::insert(), mmx::inside_append(), mmx::list_apply(), mmx::list_map(), mmx::list_map_n(), mmx::map(), mmx::mmx_classical_delete(), mmx::mmx_lex(), mmx::next_power_of_three(), mmx::next_power_of_two(), mmx::nullary_set(), vector< C, V >::operator<<(), sparse_vector< C, T, V >::operator[](), heap< C >::operator[](), mmx::path_name(), mmx::range(), binary_helper< vector< C, V > >::read(), binary_helper< table< C, T, V > >::read(), binary_helper< sparse_vector< C, T, V > >::read(), binary_helper< string >::read(), binary_helper< new_table< C, T, V > >::read(), binary_helper< heap< C > >::read(), binary_helper< chain< C > >::read(), mmx::remove(), heap_rep< C >::resize(), mmx::reverse(), mmx::scheme_to_tm(), socket_port_rep::send(), implementation< vector_linear, V, vector_naive >::set(), project_helper< vector< C, V > >::set_op(), lift_helper< vector< C, V > >::set_op(), mmx::size(), mmx::sort(), new_table_iterator_rep< C, T, V >::spool(), new_entries_iterator_rep< C, T, V >::spool(), string::string(), mmx::string_to_numeric(), mmx::test_keyword(), mmx::type_name(), mmx::unary_hash(), mmx::unary_map(), mmx::unary_set(), mmx::unary_set_scalar(), threshold_helper_1< C, uniform_threshold< n > >::val(), mmx::var_load(), vector< observer >::vector(), mmx::vector_find(), mmx::vector_map(), mmx::vector_map_1(), mmx::vector_map_2(), mmx::vector_map_n(), mmx::vector_reverse(), mmx::WRAP_BINARY_IMPL_1(), mmx::write(), and mmx::xgen_sub().
#define pos (obj->lex_pos) |
Definition at line 25 of file mmx_lexer.cpp.
Referenced by input_string_port_rep::busy(), input_output_string_port_rep::can_read(), input_string_port_rep::can_read(), input_output_string_port_rep::expression(), input_string_port_rep::expression(), mmx::handle_completion_request(), mmx::mmx_lex(), mmx::parse_lisp(), input_output_string_port_rep::read(), input_string_port_rep::read(), mmx::resolve_name(), and mmx::test_keyword().
#define prev (obj->lex_prev) |
Definition at line 24 of file mmx_lexer.cpp.
#define prev_begin_line (obj->lex_prev_begin_line) |
Definition at line 32 of file mmx_lexer.cpp.
#define prev_line (obj->lex_prev_line) |
Definition at line 28 of file mmx_lexer.cpp.
#define produce | ( | code | ) |
{ \ *lval = lit(string (s + start, pos - start)); \ source_insert (*lval, source_location (*lval, file, input, \ source_position(start, start_line, start - start_begin_line),\ source_position(pos, line, pos - begin_line))); \ return code; }
Definition at line 45 of file mmx_lexer.cpp.
Referenced by mmx::mmx_lex().
#define RESTORE_START { pos = start; line = start_line; begin_line = start_begin_line; } |
Definition at line 43 of file mmx_lexer.cpp.
Referenced by mmx::test_keyword().
#define s (obj->lex_string) |
Definition at line 20 of file mmx_lexer.cpp.
Referenced by mmx::apply(), mmx::as_math(), mmx::as_texmacs(), mmx::bit_size(), mmx::bool(), input_string_port_rep::busy(), input_output_string_port_rep::can_read(), input_string_port_rep::can_read(), mmx::ends(), error_port_rep::error_message(), input_output_string_port_rep::expression(), input_string_port_rep::expression(), output_string_port_rep::expression(), error_port_rep::expression(), mmx::is_applicable(), mmx::mmc_load(), mmx::mmc_parse(), mmx::mmx_lex(), mmx::numeric_as_string(), mmx::parse_lisp(), input_output_string_port_rep::read(), input_string_port_rep::read(), binary_helper< bool >::read(), mmx::serialize(), mmx::set_as(), mmx::shell_terminal_input(), mmx::signed_decompose(), mmx::source_error(), mmx::spaces(), mmx::starts(), mmx::strip_preamble(), mmx::test_keyword(), mmx::texmacs_flush_commands(), mmx::tokenize(), mmx::unquote(), input_output_string_port_rep::write(), and output_string_port_rep::write().
#define SAVE_START { start = pos; start_line = line; start_begin_line = begin_line; } |
Definition at line 42 of file mmx_lexer.cpp.
Referenced by mmx::mmx_lex().
#define SET_PREV { prev = pos; prev_line = line; prev_begin_line = begin_line; } |
Definition at line 41 of file mmx_lexer.cpp.
Referenced by mmx::mmx_lex().
#define start (obj->lex_start) |
Definition at line 23 of file mmx_lexer.cpp.
Referenced by mmx::parse_lisp(), mmx::path_name(), mmx::tokenize(), mmx::var_load(), and formatting_port_rep::write().
#define start_begin_line (obj->lex_start_begin_line) |
Definition at line 31 of file mmx_lexer.cpp.
#define start_line (obj->lex_start_line) |
Definition at line 27 of file mmx_lexer.cpp.
#define test | ( | c, | |||
code | ) | if ((pos<n) && (s[pos]==c)) { INC_POS; produce (code); } |
Definition at line 52 of file mmx_lexer.cpp.
Referenced by mmx::mmx_lex().