1 %option noinput nounput noyywrap
4 /* arlex.l - Strange script language lexer */
6 /* Copyright (C) 1992-2017 Free Software Foundation, Inc.
8 This file is part of GNU Binutils.
10 This program is free software; you can redistribute it and/or modify
11 it under the terms of the GNU General Public License as published by
12 the Free Software Foundation; either version 3 of the License, or
13 (at your option) any later version.
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License for more details.
20 You should have received a copy of the GNU General Public License
21 along with this program; if not, write to the Free Software
22 Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
23 MA 02110-1301, USA. */
26 /* Contributed by Steve Chamberlain <sac@cygnus.com>. */
28 #define DONTDECLARE_MALLOC
30 #include "libiberty.h"
37 extern int yylex (void);
47 "ADDLIB" { return ADDLIB; }
48 "ADDMOD" { return ADDMOD; }
49 "CLEAR" { return CLEAR; }
50 "CREATE" { return CREATE; }
51 "DELETE" { return DELETE; }
52 "DIRECTORY" { return DIRECTORY; }
54 "EXTRACT" { return EXTRACT; }
55 "FULLDIR" { return FULLDIR; }
56 "HELP" { return HELP; }
57 "LIST" { return LIST; }
58 "OPEN" { return OPEN; }
59 "REPLACE" { return REPLACE; }
60 "VERBOSE" { return VERBOSE; }
61 "SAVE" { return SAVE; }
62 "addlib" { return ADDLIB; }
63 "addmod" { return ADDMOD; }
64 "clear" { return CLEAR; }
65 "create" { return CREATE; }
66 "delete" { return DELETE; }
67 "directory" { return DIRECTORY; }
69 "extract" { return EXTRACT; }
70 "fulldir" { return FULLDIR; }
71 "help" { return HELP; }
72 "list" { return LIST; }
73 "open" { return OPEN; }
74 "replace" { return REPLACE; }
75 "verbose" { return VERBOSE; }
76 "save" { return SAVE; }
77 "+\n" { linenumber ++; }
81 [A-Za-z0-9/\\$:.\-\_]+ {
82 yylval.name = xstrdup (yytext);
88 "\n" { linenumber ++; return NEWLINE; }