/* -*- indented-text -*- */
/* Process source files and output type information.
- Copyright (C) 2002, 2003, 2004, 2005, 2007 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2003, 2004, 2005, 2007, 2008, 2009
+ Free Software Foundation, Inc.
This file is part of GCC.
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
+%option noinput
+
%{
#include "bconfig.h"
#include "system.h"
"/*" { BEGIN(in_struct_comment); }
{WS} { update_lineno (yytext, yyleng); }
+\\\n { lexer_line.line++; }
"const"/{EOID} /* don't care */
"GTY"/{EOID} { return GTY_TOKEN; }
"nested_ptr"/{EOID} { return NESTED_PTR; }
[0-9]+ { return NUM; }
"param"[0-9]*"_is"/{EOID} {
- *yylval = xmemdup (yytext, yyleng, yyleng+1);
+ *yylval = XDUPVAR (const char, yytext, yyleng, yyleng+1);
return PARAM_IS;
}
for (len = yyleng; ISSPACE (yytext[len-1]); len--)
;
- *yylval = xmemdup (yytext, len, len+1);
+ *yylval = XDUPVAR (const char, yytext, len, len+1);
update_lineno (yytext, yyleng);
return SCALAR;
}
{ID}/{EOID} {
- *yylval = xmemdup (yytext, yyleng, yyleng+1);
+ *yylval = XDUPVAR (const char, yytext, yyleng, yyleng+1);
return ID;
}
\"([^"\\]|\\.)*\" {
- *yylval = xmemdup (yytext+1, yyleng-2, yyleng-1);
+ *yylval = XDUPVAR (const char, yytext+1, yyleng-2, yyleng-1);
return STRING;
}
/* This "terminal" avoids having to parse integer constant expressions. */
"["[^\[\]]*"]" {
- *yylval = xmemdup (yytext+1, yyleng-2, yyleng-1);
+ *yylval = XDUPVAR (const char, yytext+1, yyleng-2, yyleng-1);
return ARRAY;
}
"'"("\\".|[^\\])"'" {
- *yylval = xmemdup (yytext+1, yyleng-2, yyleng);
+ *yylval = XDUPVAR (const char, yytext+1, yyleng-2, yyleng);
return CHAR;
}
}
^{HWS}"#"{HWS}"define"{WS}"GTY(" /* do nothing */
-{WS}"GTY"{WS}?"(" {
- error_at_line (&lexer_line, "stray GTY marker");
-}
%%