X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flanguage%2Flexer%2Flexer.h;h=ccb8d73a80cd534a7e5fadba96baf4b069818d06;hb=e0cbdf0daefcca81be9572aab0deedf945687f5a;hp=027339f96eeced45ec541e14b3da0e280abbf730;hpb=f4e3578b2c8ce537de5516af55a62b84ebf2b744;p=pspp diff --git a/src/language/lexer/lexer.h b/src/language/lexer/lexer.h index 027339f96e..ccb8d73a80 100644 --- a/src/language/lexer/lexer.h +++ b/src/language/lexer/lexer.h @@ -40,7 +40,8 @@ enum lex_error_mode LEX_ERROR_TERMINAL, /* Discard input line and continue reading. */ LEX_ERROR_CONTINUE, /* Continue to next command, except for cascading failures. */ - LEX_ERROR_STOP /* Stop processing. */ + LEX_ERROR_IGNORE, /* Continue, even for cascading failures. */ + LEX_ERROR_STOP, /* Stop processing. */ }; /* Reads a single syntax file as a stream of bytes encoded in UTF-8. @@ -96,6 +97,7 @@ void lex_destroy (struct lexer *); /* Macros. */ void lex_define_macro (struct lexer *, struct macro *); +const struct macro_set *lex_get_macros (const struct lexer *); /* Files. */ void lex_include (struct lexer *, struct lex_reader *); @@ -126,6 +128,7 @@ bool lex_match_id_n (struct lexer *, const char *, size_t n); bool lex_match_int (struct lexer *, int); bool lex_at_phrase (struct lexer *, const char *s); bool lex_match_phrase (struct lexer *, const char *s); +bool lex_force_match_phrase (struct lexer *, const char *s); /* Forcible matching functions. */ bool lex_force_match (struct lexer *, enum token_type) WARN_UNUSED_RESULT; @@ -174,6 +177,7 @@ bool lex_next_is_from_macro (const struct lexer *, int n); const char *lex_get_file_name (const struct lexer *); struct msg_location *lex_get_location (const struct lexer *, int n0, int n1); const char *lex_get_encoding (const struct lexer *); +const struct lex_source *lex_source (const struct lexer *); /* Issuing errors and warnings. */ void lex_error (struct lexer *, const char *, ...) PRINTF_FORMAT (2, 3);