/* FLEX lexer for Ada expressions, for GDB.
- Copyright (C) 1994-2015 Free Software Foundation, Inc.
+ Copyright (C) 1994-2017 Free Software Foundation, Inc.
This file is part of GDB.
%{
+#include "common/diagnostics.h"
+
+/* Some old versions of flex generate code that uses the "register" keyword,
+ which clang warns about. This was observed for example with flex 2.5.35,
+ as shipped with macOS 10.12. */
+DIAGNOSTIC_PUSH
+DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER
+
#define NUMERAL_WIDTH 256
#define LONGEST_SIGN ((ULONGEST) 1 << (sizeof(LONGEST) * HOST_CHAR_BIT - 1))
/* ATTRIBUTES */
-{TICK}[a-zA-Z][a-zA-Z]+ { return processAttribute (yytext+1); }
+{TICK}[a-zA-Z][a-zA-Z]+ { BEGIN INITIAL; return processAttribute (yytext+1); }
/* PUNCTUATION */
static struct stoken
processId (const char *name0, int len)
{
- char *name = obstack_alloc (&temp_parse_space, len + 11);
+ char *name = (char *) obstack_alloc (&temp_parse_space, len + 11);
int i0, i;
struct stoken result;
const char *lim = text + len;
struct stoken result;
- q = obstack_alloc (&temp_parse_space, len);
+ q = (char *) obstack_alloc (&temp_parse_space, len);
result.ptr = q;
p = text;
while (p < lim)
{
(dummy_function) yyunput
};
+
+DIAGNOSTIC_POP