133965Sjdp/* read.h - of read.c
278828Sobrien   Copyright 1986, 1990, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
3218822Sdim   2000, 2001, 2002, 2003, 2004, 2005
438889Sjdp   Free Software Foundation, Inc.
533965Sjdp
633965Sjdp   This file is part of GAS, the GNU Assembler.
733965Sjdp
833965Sjdp   GAS is free software; you can redistribute it and/or modify
933965Sjdp   it under the terms of the GNU General Public License as published by
1033965Sjdp   the Free Software Foundation; either version 2, or (at your option)
1133965Sjdp   any later version.
1233965Sjdp
1333965Sjdp   GAS is distributed in the hope that it will be useful,
1433965Sjdp   but WITHOUT ANY WARRANTY; without even the implied warranty of
1533965Sjdp   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1633965Sjdp   GNU General Public License for more details.
1733965Sjdp
1833965Sjdp   You should have received a copy of the GNU General Public License
1977298Sobrien   along with GAS; see the file COPYING.  If not, write to the Free
20218822Sdim   Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
21218822Sdim   02110-1301, USA.  */
2233965Sjdp
2377298Sobrienextern char *input_line_pointer;	/* -> char we are parsing now.  */
2433965Sjdp
2577298Sobrien/* Define to make whitespace be allowed in many syntactically
2677298Sobrien   unnecessary places.  Normally undefined.  For compatibility with
2777298Sobrien   ancient GNU cc.  */
2833965Sjdp/* #undef PERMIT_WHITESPACE */
2977298Sobrien#define PERMIT_WHITESPACE
3033965Sjdp
3133965Sjdp#ifdef PERMIT_WHITESPACE
3277298Sobrien#define SKIP_WHITESPACE()			\
33222205Sbenl  do { if (*input_line_pointer == ' ') ++input_line_pointer; } while (0)
3433965Sjdp#else
3533965Sjdp#define SKIP_WHITESPACE() know(*input_line_pointer != ' ' )
3633965Sjdp#endif
3733965Sjdp
3833965Sjdp#define	LEX_NAME	(1)	/* may continue a name */
3933965Sjdp#define LEX_BEGIN_NAME	(2)	/* may begin a name */
4060484Sobrien#define LEX_END_NAME	(4)	/* ends a name */
4133965Sjdp
4233965Sjdp#define is_name_beginner(c) \
4333965Sjdp  ( lex_type[(unsigned char) (c)] & LEX_BEGIN_NAME )
4433965Sjdp#define is_part_of_name(c) \
4533965Sjdp  ( lex_type[(unsigned char) (c)] & LEX_NAME       )
4660484Sobrien#define is_name_ender(c) \
4760484Sobrien  ( lex_type[(unsigned char) (c)] & LEX_END_NAME   )
4833965Sjdp
4933965Sjdp#ifndef is_a_char
5033965Sjdp#define CHAR_MASK	(0xff)
5133965Sjdp#define NOT_A_CHAR	(CHAR_MASK+1)
5277298Sobrien#define is_a_char(c)	(((unsigned) (c)) <= CHAR_MASK)
5333965Sjdp#endif /* is_a_char() */
5433965Sjdp
5533965Sjdpextern char lex_type[];
5633965Sjdpextern char is_end_of_line[];
5733965Sjdp
58130561Sobrienextern int is_it_end_of_statement (void);
59218822Sdimextern char *find_end_of_line (char *, int);
6033965Sjdp
6133965Sjdpextern int target_big_endian;
6233965Sjdp
6333965Sjdp/* These are initialized by the CPU specific target files (tc-*.c).  */
6433965Sjdpextern const char comment_chars[];
6533965Sjdpextern const char line_comment_chars[];
6633965Sjdpextern const char line_separator_chars[];
6733965Sjdp
6838889Sjdp/* Table of -I directories.  */
6938889Sjdpextern char **include_dirs;
7038889Sjdpextern int include_dir_count;
7138889Sjdpextern int include_dir_maxlen;
7233965Sjdp
7333965Sjdp/* The offset in the absolute section.  */
7433965Sjdpextern addressT abs_section_offset;
7533965Sjdp
7633965Sjdp/* The label on a line, used by some of the pseudo-ops.  */
7733965Sjdpextern symbolS *line_label;
7833965Sjdp
7933965Sjdp/* This is used to support MRI common sections.  */
8033965Sjdpextern symbolS *mri_common_symbol;
8133965Sjdp
8277298Sobrien/* True if a stabs line debug statement is currently being emitted.  */
8377298Sobrienextern int outputting_stabs_line_debug;
8477298Sobrien
8533965Sjdp/* Possible arguments to .linkonce.  */
8677298Sobrienenum linkonce_type {
8733965Sjdp  LINKONCE_UNSET = 0,
8833965Sjdp  LINKONCE_DISCARD,
8933965Sjdp  LINKONCE_ONE_ONLY,
9033965Sjdp  LINKONCE_SAME_SIZE,
9133965Sjdp  LINKONCE_SAME_CONTENTS
9233965Sjdp};
9333965Sjdp
94130561Sobrien#ifndef TC_CASE_SENSITIVE
9577298Sobrienextern char original_case_string[];
9677298Sobrien#endif
9777298Sobrien
98130561Sobrienextern void pop_insert (const pseudo_typeS *);
9933965Sjdpextern unsigned int get_stab_string_offset
100130561Sobrien  (const char *string, const char *stabstr_secname);
101130561Sobrienextern void aout_process_stab (int, const char *, int, int, int);
102130561Sobrienextern char *demand_copy_string (int *lenP);
103130561Sobrienextern char *demand_copy_C_string (int *len_pointer);
104130561Sobrienextern char get_absolute_expression_and_terminator (long *val_pointer);
105130561Sobrienextern offsetT get_absolute_expression (void);
106130561Sobrienextern unsigned int next_char_of_string (void);
107130561Sobrienextern void s_mri_sect (char *);
108130561Sobrienextern char *mri_comment_field (char *);
109130561Sobrienextern void mri_comment_end (char *, int);
110130561Sobrienextern void add_include_dir (char *path);
111130561Sobrienextern void cons (int nbytes);
112130561Sobrienextern void demand_empty_rest_of_line (void);
113130561Sobrienextern void emit_expr (expressionS *exp, unsigned int nbytes);
114130561Sobrienextern void equals (char *sym_name, int reassign);
115130561Sobrienextern void float_cons (int float_type);
116130561Sobrienextern void ignore_rest_of_line (void);
117218822Sdim#define discard_rest_of_line ignore_rest_of_line
118130561Sobrienextern int output_leb128 (char *, valueT, int sign);
119130561Sobrienextern void pseudo_set (symbolS * symbolP);
120130561Sobrienextern void read_a_source_file (char *name);
121130561Sobrienextern void read_begin (void);
122130561Sobrienextern void read_print_statistics (FILE *);
123130561Sobrienextern int sizeof_leb128 (valueT, int sign);
124130561Sobrienextern void stabs_generate_asm_file (void);
125130561Sobrienextern void stabs_generate_asm_lineno (void);
126130561Sobrienextern void stabs_generate_asm_func (const char *, const char *);
127130561Sobrienextern void stabs_generate_asm_endfunc (const char *, const char *);
128130561Sobrienextern void do_repeat (int,const char *,const char *);
129130561Sobrienextern void end_repeat (int);
130130561Sobrienextern void do_parse_cons_expression (expressionS *, int);
13138889Sjdp
132130561Sobrienextern void generate_lineno_debug (void);
13360484Sobrien
134130561Sobrienextern void s_abort (int) ATTRIBUTE_NORETURN;
135130561Sobrienextern void s_align_bytes (int arg);
136130561Sobrienextern void s_align_ptwo (int);
137130561Sobrienextern void bss_alloc (symbolS *, addressT, int);
138130561Sobrienextern offsetT parse_align (int);
139130561Sobrienextern symbolS *s_comm_internal (int, symbolS *(*) (int, symbolS *, addressT));
140130561Sobrienextern symbolS *s_lcomm_internal (int, symbolS *, addressT);
141218822Sdimextern void s_app_file_string (char *, int);
142130561Sobrienextern void s_app_file (int);
143130561Sobrienextern void s_app_line (int);
144130561Sobrienextern void s_comm (int);
145130561Sobrienextern void s_data (int);
146130561Sobrienextern void s_desc (int);
147130561Sobrienextern void s_else (int arg);
148130561Sobrienextern void s_elseif (int arg);
149130561Sobrienextern void s_end (int arg);
150130561Sobrienextern void s_endif (int arg);
151130561Sobrienextern void s_err (int);
152218822Sdimextern void s_errwarn (int);
153130561Sobrienextern void s_fail (int);
154130561Sobrienextern void s_fill (int);
155130561Sobrienextern void s_float_space (int mult);
156130561Sobrienextern void s_func (int);
157130561Sobrienextern void s_globl (int arg);
158130561Sobrienextern void s_if (int arg);
159218822Sdimextern void s_ifb (int arg);
160130561Sobrienextern void s_ifc (int arg);
161130561Sobrienextern void s_ifdef (int arg);
162130561Sobrienextern void s_ifeqs (int arg);
163130561Sobrienextern void s_ignore (int arg);
164130561Sobrienextern void s_include (int arg);
165130561Sobrienextern void s_irp (int arg);
166130561Sobrienextern void s_lcomm (int needs_align);
167130561Sobrienextern void s_lcomm_bytes (int needs_align);
168130561Sobrienextern void s_leb128 (int sign);
169130561Sobrienextern void s_linkonce (int);
170130561Sobrienextern void s_lsym (int);
171130561Sobrienextern void s_macro (int);
172130561Sobrienextern void s_mexit (int);
173130561Sobrienextern void s_mri (int);
174130561Sobrienextern void s_mri_common (int);
175130561Sobrienextern void s_org (int);
176130561Sobrienextern void s_print (int);
177130561Sobrienextern void s_purgem (int);
178130561Sobrienextern void s_rept (int);
179130561Sobrienextern void s_set (int);
180130561Sobrienextern void s_space (int mult);
181130561Sobrienextern void s_stab (int what);
182130561Sobrienextern void s_struct (int);
183130561Sobrienextern void s_text (int);
184130561Sobrienextern void stringer (int append_zero);
185130561Sobrienextern void s_xstab (int what);
186130561Sobrienextern void s_rva (int);
187130561Sobrienextern void s_incbin (int);
188218822Sdimextern void s_vendor_attribute (int);
189218822Sdimextern void s_weakref (int);
190