Add -Wshadow to the gcc command line options used when compiling the binutils.
[deliverable/binutils-gdb.git] / binutils / arlex.l
CommitLineData
cfdf38f2
BE
1%option noinput nounput
2
252b5132
RH
3%{
4/* arlex.l - Strange script language lexer */
5
aa820537 6/* Copyright 1992, 1997, 2000, 2001, 2002, 2003, 2004, 2005, 2007
aef6203b 7 Free Software Foundation, Inc.
252b5132 8
32866df7 9 This file is part of GNU Binutils.
252b5132 10
32866df7
NC
11 This program is free software; you can redistribute it and/or modify
12 it under the terms of the GNU General Public License as published by
13 the Free Software Foundation; either version 3 of the License, or
14 (at your option) any later version.
252b5132 15
32866df7
NC
16 This program is distributed in the hope that it will be useful,
17 but WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 GNU General Public License for more details.
252b5132 20
32866df7
NC
21 You should have received a copy of the GNU General Public License
22 along with this program; if not, write to the Free Software
23 Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
24 MA 02110-1301, USA. */
252b5132
RH
25
26
a2f33459 27/* Contributed by Steve Chamberlain <sac@cygnus.com>. */
252b5132 28
252b5132 29#define DONTDECLARE_MALLOC
e9792343 30#include "ansidecl.h"
252b5132
RH
31#include "libiberty.h"
32#include "arparse.h"
33
956c53ee
TS
34#define YY_NO_UNPUT
35
2da42df6 36extern int yylex (void);
956c53ee 37
252b5132
RH
38int linenumber;
39%}
12ff5d56
AM
40
41%a 10000
42%o 25000
43
252b5132
RH
44%%
45
46"ADDLIB" { return ADDLIB; }
47"ADDMOD" { return ADDMOD; }
48"CLEAR" { return CLEAR; }
49"CREATE" { return CREATE; }
50"DELETE" { return DELETE; }
51"DIRECTORY" { return DIRECTORY; }
52"END" { return END; }
53"EXTRACT" { return EXTRACT; }
54"FULLDIR" { return FULLDIR; }
55"HELP" { return HELP; }
56"LIST" { return LIST; }
57"OPEN" { return OPEN; }
58"REPLACE" { return REPLACE; }
59"VERBOSE" { return VERBOSE; }
60"SAVE" { return SAVE; }
61"addlib" { return ADDLIB; }
62"addmod" { return ADDMOD; }
63"clear" { return CLEAR; }
64"create" { return CREATE; }
65"delete" { return DELETE; }
66"directory" { return DIRECTORY; }
67"end" { return END; }
68"extract" { return EXTRACT; }
69"fulldir" { return FULLDIR; }
70"help" { return HELP; }
71"list" { return LIST; }
72"open" { return OPEN; }
73"replace" { return REPLACE; }
74"verbose" { return VERBOSE; }
75"save" { return SAVE; }
76"+\n" { linenumber ++; }
77"(" { return '('; }
78")" { return ')'; }
79"," { return ','; }
5e9520c8 80[A-Za-z0-9/\\$:.\-\_]+ {
252b5132
RH
81 yylval.name = xstrdup (yytext);
82 return FILENAME;
83 }
84"*".* { }
85";".* { }
86" " { }
87"\n" { linenumber ++; return NEWLINE; }
88
89%%
90#ifndef yywrap
91/* Needed for lex, though not flex. */
2da42df6 92int yywrap(void) { return 1; }
252b5132 93#endif
This page took 0.364646 seconds and 4 git commands to generate.