* coffcode.h (coff_set_arch_mach_hook): Don't use variable-size
[binutils.git] / binutils / arlex.l
blob74e13d13dfe295a88589e73088694d6179363d87
1 %{
2 /* arlex.l - Strange script language lexer */
4 /*   Copyright (C) 1992, 95, 1997 Free Software Foundation, Inc.
6 This file is part of GNU Binutils.
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2 of the License, or
11 (at your option) any later version.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
23 /* Contributed by Steve Chamberlain
24                   sac@cygnus.com
27 #define DONTDECLARE_MALLOC
28 #include <ansidecl.h>
29 #include "libiberty.h"
30 #include "arparse.h"
32 int linenumber;
36 "ADDLIB"        { return ADDLIB; }
37 "ADDMOD"        { return ADDMOD; }
38 "CLEAR"         { return CLEAR; }
39 "CREATE"        { return CREATE; }
40 "DELETE"        { return DELETE; }
41 "DIRECTORY"     { return DIRECTORY; }
42 "END"           { return END; }
43 "EXTRACT"       { return EXTRACT; }
44 "FULLDIR"       { return FULLDIR; }
45 "HELP"          { return HELP; }
46 "LIST"          { return LIST; }
47 "OPEN"          { return OPEN; }
48 "REPLACE"       { return REPLACE; }
49 "VERBOSE"       { return VERBOSE; }
50 "SAVE"          { return SAVE; }
51 "addlib"        { return ADDLIB; }
52 "addmod"        { return ADDMOD; }
53 "clear"         { return CLEAR; }
54 "create"        { return CREATE; }
55 "delete"        { return DELETE; }
56 "directory"     { return DIRECTORY; }
57 "end"           { return END; }
58 "extract"       { return EXTRACT; }
59 "fulldir"       { return FULLDIR; }
60 "help"          { return HELP; }
61 "list"          { return LIST; }
62 "open"          { return OPEN; }
63 "replace"       { return REPLACE; }
64 "verbose"       { return VERBOSE; }
65 "save"          { return SAVE; }
66 "+\n"           { linenumber ++; }
67 "("             { return '('; }
68 ")"             { return ')'; }
69 ","             { return ','; }
70 [A-Za-z0-9/$:.\-\_]+  {         
71                 yylval.name =  xstrdup (yytext);
72                 return FILENAME;
73                 }
74 "*".*           { }
75 ";".*           { }
76 " "             { }
77 "\n"             { linenumber ++; return NEWLINE; }     
80 #ifndef yywrap
81 /* Needed for lex, though not flex. */
82 int yywrap() { return 1; }
83 #endif