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