#include "libpspp/prompt.h"
struct lexer;
+struct macro;
/* Handling of errors. */
enum lex_error_mode
struct lexer *lex_create (void);
void lex_destroy (struct lexer *);
+/* Macros. */
+void lex_define_macro (struct lexer *, struct macro *);
+
/* Files. */
void lex_include (struct lexer *, struct lex_reader *);
void lex_append (struct lexer *, struct lex_reader *);
struct substring lex_next_tokss (const struct lexer *, int n);
/* Token representation. */
-struct substring lex_next_representation (const struct lexer *,
- int n0, int n1);
+char *lex_next_representation (const struct lexer *, int n0, int n1);
+bool lex_next_is_from_macro (const struct lexer *, int n);
/* Current position. */
int lex_get_first_line_number (const struct lexer *, int n);
const char *format, va_list)
PRINTF_FORMAT (4, 0);
+void lex_ellipsize (struct substring in, char *out, size_t out_size);
+
/* Error handling. */
enum segmenter_mode lex_get_syntax_mode (const struct lexer *);
enum lex_error_mode lex_get_error_mode (const struct lexer *);