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