diff options
author | thegeorg <thegeorg@yandex-team.com> | 2024-08-10 10:33:06 +0300 |
---|---|---|
committer | thegeorg <thegeorg@yandex-team.com> | 2024-08-10 10:42:26 +0300 |
commit | f606bdbedff44a60218a7007de93ee20833c7b17 (patch) | |
tree | 0fd57c06f31dff131521686b3d9eb7def12769ec /contrib/tools/bison/src/complain.h | |
parent | 57386fad9537813e2135b5b19949e5597d7b5b50 (diff) | |
download | ydb-f606bdbedff44a60218a7007de93ee20833c7b17.tar.gz |
Update contrib/tools/bison to 3.6.4
9febd1b3a041f2e2083c076fbde9680a7cdc9b9e
Diffstat (limited to 'contrib/tools/bison/src/complain.h')
-rw-r--r-- | contrib/tools/bison/src/complain.h | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/contrib/tools/bison/src/complain.h b/contrib/tools/bison/src/complain.h index 9cb6a60657..65204ce038 100644 --- a/contrib/tools/bison/src/complain.h +++ b/contrib/tools/bison/src/complain.h @@ -21,9 +21,6 @@ # include "location.h" -/* Sub-messages indent. */ -# define SUB_INDENT (4) - /*---------------. | Error stream. | `---------------*/ @@ -119,6 +116,7 @@ typedef enum fatal = 1 << 12, /**< All fatal errors. */ silent = 1 << 13, /**< Do not display the warning type. */ no_caret = 1 << 14, /**< Do not display caret location. */ + note = 1 << 15, /**< Display as a note. */ /**< All above warnings. */ Weverything = ~complaint & ~fatal & ~silent, @@ -137,13 +135,13 @@ void complain (location const *loc, warnings flags, char const *message, ...) __attribute__ ((__format__ (__printf__, 3, 4))); /** Likewise, but with an \a argc/argv interface. */ -void complain_args (location const *loc, warnings w, int *indent, +void complain_args (location const *loc, warnings w, int argc, char *arg[]); -/** Make a complaint with location and some indentation. */ -void complain_indent (location const *loc, warnings flags, int *indent, - char const *message, ...) - __attribute__ ((__format__ (__printf__, 4, 5))); +/** Make a subcomplain with location and note. */ +void subcomplain (location const *loc, warnings flags, + char const *message, ...) + __attribute__ ((__format__ (__printf__, 3, 4))); /** GNU Bison extension not valid with POSIX Yacc. */ @@ -161,6 +159,11 @@ void duplicate_directive (char const *directive, void duplicate_rule_directive (char const *directive, location first, location second); +/** Report a syntax error, where argv[0] is the unexpected + token, and argv[1...argc] are the expected ones. */ +void syntax_error (location loc, + int argc, const char* argv[]); + /** Warnings treated as errors shouldn't stop the execution as regular errors should (because due to their nature, it is safe to go on). Thus, there are three possible execution statuses. */ |