X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flanguage%2Flexer%2Flexer.h;h=ed4711213a7f64ab2bb3a119d870a356abb9e852;hb=981adc6169ffe7227de286f92f70edf684d37a2b;hp=5493db9b6a29175c7b522911c4782f70cf191a65;hpb=510cc9dd9baf3108ba55cfb7893384517c9930b4;p=pspp diff --git a/src/language/lexer/lexer.h b/src/language/lexer/lexer.h index 5493db9b6a..ed4711213a 100644 --- a/src/language/lexer/lexer.h +++ b/src/language/lexer/lexer.h @@ -134,6 +134,12 @@ bool lex_force_int (struct lexer *) WARN_UNUSED_RESULT; bool lex_force_int_range (struct lexer *, const char *name, long min, long max) WARN_UNUSED_RESULT; bool lex_force_num (struct lexer *) WARN_UNUSED_RESULT; +bool lex_force_num_range_closed (struct lexer *, const char *name, + double min, double max) WARN_UNUSED_RESULT; +bool lex_force_num_range_halfopen (struct lexer *, const char *name, + double min, double max) WARN_UNUSED_RESULT; +bool lex_force_num_range_open (struct lexer *, const char *name, + double min, double max) WARN_UNUSED_RESULT; bool lex_force_id (struct lexer *) WARN_UNUSED_RESULT; bool lex_force_string (struct lexer *) WARN_UNUSED_RESULT; bool lex_force_string_or_id (struct lexer *) WARN_UNUSED_RESULT; @@ -160,6 +166,7 @@ struct msg_point lex_ofs_end_point (const struct lexer *, int ofs); /* Token representation. */ char *lex_next_representation (const struct lexer *, int n0, int n1); +char *lex_ofs_representation (const struct lexer *, int ofs0, int ofs1); bool lex_next_is_from_macro (const struct lexer *, int n); /* Current position. */ @@ -171,6 +178,8 @@ const char *lex_get_encoding (const struct lexer *); void lex_error (struct lexer *, const char *, ...) PRINTF_FORMAT (2, 3); void lex_next_error (struct lexer *, int n0, int n1, const char *, ...) PRINTF_FORMAT (4, 5); +void lex_ofs_error (struct lexer *, int ofs0, int ofs1, const char *, ...) + PRINTF_FORMAT (4, 5); int lex_end_of_command (struct lexer *); void lex_error_expecting (struct lexer *, ...) SENTINEL(0); @@ -189,8 +198,8 @@ void lex_spec_missing (struct lexer *, const char *subcommand, void lex_error_valist (struct lexer *, const char *, va_list) PRINTF_FORMAT (2, 0); -void lex_next_error_valist (struct lexer *lexer, int n0, int n1, - const char *format, va_list) +void lex_ofs_error_valist (struct lexer *lexer, int ofs0, int ofs1, + const char *format, va_list) PRINTF_FORMAT (4, 0); /* Error handling. */