1999-05-03 15:29:11 +08:00
|
|
|
/* ldlex.h -
|
2009-09-02 15:25:43 +08:00
|
|
|
Copyright 1991, 1992, 1993, 1994, 1995, 1997, 2000, 2003, 2005, 2006, 2007
|
2001-03-13 14:14:29 +08:00
|
|
|
Free Software Foundation, Inc.
|
1999-05-03 15:29:11 +08:00
|
|
|
|
2007-07-06 22:09:45 +08:00
|
|
|
This file is part of the GNU Binutils.
|
1999-05-03 15:29:11 +08:00
|
|
|
|
2007-07-06 22:09:45 +08:00
|
|
|
This program is free software; you can redistribute it and/or modify
|
1999-05-03 15:29:11 +08:00
|
|
|
it under the terms of the GNU General Public License as published by
|
2007-07-06 22:09:45 +08:00
|
|
|
the Free Software Foundation; either version 3 of the License, or
|
|
|
|
(at your option) any later version.
|
1999-05-03 15:29:11 +08:00
|
|
|
|
2007-07-06 22:09:45 +08:00
|
|
|
This program is distributed in the hope that it will be useful,
|
1999-05-03 15:29:11 +08:00
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
2007-07-06 22:09:45 +08:00
|
|
|
along with this program; if not, write to the Free Software
|
|
|
|
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
|
|
|
|
MA 02110-1301, USA. */
|
1999-05-03 15:29:11 +08:00
|
|
|
|
|
|
|
#ifndef LDLEX_H
|
|
|
|
#define LDLEX_H
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
|
|
|
|
/* The initial parser states. */
|
|
|
|
typedef enum input_enum {
|
|
|
|
input_selected, /* We've set the initial state. */
|
|
|
|
input_script,
|
|
|
|
input_mri_script,
|
|
|
|
input_version_script,
|
2006-09-08 01:16:34 +08:00
|
|
|
input_dynamic_list,
|
1999-05-03 15:29:11 +08:00
|
|
|
input_defsym
|
|
|
|
} input_type;
|
|
|
|
|
|
|
|
extern input_type parser_input;
|
|
|
|
|
|
|
|
extern unsigned int lineno;
|
|
|
|
extern const char *lex_string;
|
|
|
|
|
|
|
|
/* In ldlex.l. */
|
2003-06-28 13:28:54 +08:00
|
|
|
extern int yylex (void);
|
|
|
|
extern void lex_push_file (FILE *, const char *);
|
|
|
|
extern void lex_redirect (const char *);
|
|
|
|
extern void ldlex_script (void);
|
|
|
|
extern void ldlex_mri_script (void);
|
|
|
|
extern void ldlex_version_script (void);
|
|
|
|
extern void ldlex_version_file (void);
|
|
|
|
extern void ldlex_defsym (void);
|
|
|
|
extern void ldlex_expression (void);
|
|
|
|
extern void ldlex_both (void);
|
|
|
|
extern void ldlex_command (void);
|
|
|
|
extern void ldlex_popstate (void);
|
1999-05-03 15:29:11 +08:00
|
|
|
|
|
|
|
/* In lexsup.c. */
|
2003-06-28 13:28:54 +08:00
|
|
|
extern int lex_input (void);
|
|
|
|
extern void lex_unput (int);
|
1999-05-03 15:29:11 +08:00
|
|
|
#ifndef yywrap
|
2003-06-28 13:28:54 +08:00
|
|
|
extern int yywrap (void);
|
1999-05-03 15:29:11 +08:00
|
|
|
#endif
|
2003-06-28 13:28:54 +08:00
|
|
|
extern void parse_args (unsigned, char **);
|
1999-05-03 15:29:11 +08:00
|
|
|
|
|
|
|
#endif
|