X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=src%2Flanguage%2Flexer%2Flexer.h;h=596e27a335422eda40b2139e47ceae3480126544;hb=69bf3f901b0a949cfa957950f55df78d0c86a765;hp=caf57503317973788122afd42367d0a4eeaf1b1f;hpb=321290aa58ad553951a4448ea512ebeed4ddf9b1;p=pspp diff --git a/src/language/lexer/lexer.h b/src/language/lexer/lexer.h index caf5750331..596e27a335 100644 --- a/src/language/lexer/lexer.h +++ b/src/language/lexer/lexer.h @@ -29,6 +29,7 @@ #include "libpspp/prompt.h" struct lexer; +struct macro; /* Handling of errors. */ enum lex_error_mode @@ -90,6 +91,9 @@ struct lex_reader *lex_reader_for_substring_nocopy (struct substring, const char 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 *); @@ -142,6 +146,11 @@ const char *lex_next_tokcstr (const struct lexer *, int n); double lex_next_tokval (const struct lexer *, int n); struct substring lex_next_tokss (const struct lexer *, int n); +/* Token representation. */ +struct substring 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); int lex_get_last_line_number (const struct lexer *, int n);