OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [binutils-2.18.50/] [binutils/] [arlex.l] - Diff between revs 156 and 816

Go to most recent revision | Only display areas with differences | Details | Blame | View Log

Rev 156 Rev 816
%{
%{
/* arlex.l - Strange script language lexer */
/* arlex.l - Strange script language lexer */
/* Copyright 1992, 1997, 2000, 2001, 2002, 2003, 2004, 2007
/* Copyright 1992, 1997, 2000, 2001, 2002, 2003, 2004, 2007
   Free Software Foundation, Inc.
   Free Software Foundation, Inc.
   This file is part of GNU Binutils.
   This file is part of GNU Binutils.
   This program is free software; you can redistribute it and/or modify
   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 3 of the License, or
   the Free Software Foundation; either version 3 of the License, or
   (at your option) any later version.
   (at your option) any later version.
   This program is distributed in the hope that it will be useful,
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.
   GNU General Public License for more details.
   You should have received a copy of the GNU General Public License
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
   along with this program; if not, write to the Free Software
   Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
   Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
   MA 02110-1301, USA.  */
   MA 02110-1301, USA.  */
/* Contributed by Steve Chamberlain .  */
/* Contributed by Steve Chamberlain .  */
#define DONTDECLARE_MALLOC
#define DONTDECLARE_MALLOC
#include "ansidecl.h"
#include "ansidecl.h"
#include "libiberty.h"
#include "libiberty.h"
#include "arparse.h"
#include "arparse.h"
#define YY_NO_UNPUT
#define YY_NO_UNPUT
extern int yylex (void);
extern int yylex (void);
int linenumber;
int linenumber;
%}
%}
%a 10000
%a 10000
%o 25000
%o 25000
%%
%%
"ADDLIB"        { return ADDLIB; }
"ADDLIB"        { return ADDLIB; }
"ADDMOD"        { return ADDMOD; }
"ADDMOD"        { return ADDMOD; }
"CLEAR"         { return CLEAR; }
"CLEAR"         { return CLEAR; }
"CREATE"        { return CREATE; }
"CREATE"        { return CREATE; }
"DELETE"        { return DELETE; }
"DELETE"        { return DELETE; }
"DIRECTORY"     { return DIRECTORY; }
"DIRECTORY"     { return DIRECTORY; }
"END"           { return END; }
"END"           { return END; }
"EXTRACT"       { return EXTRACT; }
"EXTRACT"       { return EXTRACT; }
"FULLDIR"       { return FULLDIR; }
"FULLDIR"       { return FULLDIR; }
"HELP"          { return HELP; }
"HELP"          { return HELP; }
"LIST"          { return LIST; }
"LIST"          { return LIST; }
"OPEN"          { return OPEN; }
"OPEN"          { return OPEN; }
"REPLACE"       { return REPLACE; }
"REPLACE"       { return REPLACE; }
"VERBOSE"       { return VERBOSE; }
"VERBOSE"       { return VERBOSE; }
"SAVE"          { return SAVE; }
"SAVE"          { return SAVE; }
"addlib"        { return ADDLIB; }
"addlib"        { return ADDLIB; }
"addmod"        { return ADDMOD; }
"addmod"        { return ADDMOD; }
"clear"         { return CLEAR; }
"clear"         { return CLEAR; }
"create"        { return CREATE; }
"create"        { return CREATE; }
"delete"        { return DELETE; }
"delete"        { return DELETE; }
"directory"     { return DIRECTORY; }
"directory"     { return DIRECTORY; }
"end"           { return END; }
"end"           { return END; }
"extract"       { return EXTRACT; }
"extract"       { return EXTRACT; }
"fulldir"       { return FULLDIR; }
"fulldir"       { return FULLDIR; }
"help"          { return HELP; }
"help"          { return HELP; }
"list"          { return LIST; }
"list"          { return LIST; }
"open"          { return OPEN; }
"open"          { return OPEN; }
"replace"       { return REPLACE; }
"replace"       { return REPLACE; }
"verbose"       { return VERBOSE; }
"verbose"       { return VERBOSE; }
"save"          { return SAVE; }
"save"          { return SAVE; }
"+\n"           { linenumber ++; }
"+\n"           { linenumber ++; }
"("             { return '('; }
"("             { return '('; }
")"             { return ')'; }
")"             { return ')'; }
","             { return ','; }
","             { return ','; }
[A-Za-z0-9/\\$:.\-\_]+  {
[A-Za-z0-9/\\$:.\-\_]+  {
                yylval.name =  xstrdup (yytext);
                yylval.name =  xstrdup (yytext);
                return FILENAME;
                return FILENAME;
                }
                }
"*".*           { }
"*".*           { }
";".*           { }
";".*           { }
" "             { }
" "             { }
"\n"             { linenumber ++; return NEWLINE; }
"\n"             { linenumber ++; return NEWLINE; }
%%
%%
#ifndef yywrap
#ifndef yywrap
/* Needed for lex, though not flex. */
/* Needed for lex, though not flex. */
int yywrap(void) { return 1; }
int yywrap(void) { return 1; }
#endif
#endif
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.