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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.2.2/] [gcc/] [input.h] - Blame information for rev 193

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 38 julius
/* Declarations for variables relating to reading the source file.
2
   Used by parsers, lexical analyzers, and error message routines.
3
   Copyright (C) 1993, 1997, 1998, 2000, 2003, 2004, 2007
4
   Free Software Foundation, Inc.
5
 
6
This file is part of GCC.
7
 
8
GCC is free software; you can redistribute it and/or modify it under
9
the terms of the GNU General Public License as published by the Free
10
Software Foundation; either version 3, or (at your option) any later
11
version.
12
 
13
GCC is distributed in the hope that it will be useful, but WITHOUT ANY
14
WARRANTY; without even the implied warranty of MERCHANTABILITY or
15
FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
16
for more details.
17
 
18
You should have received a copy of the GNU General Public License
19
along with GCC; see the file COPYING3.  If not see
20
<http://www.gnu.org/licenses/>.  */
21
 
22
#ifndef GCC_INPUT_H
23
#define GCC_INPUT_H
24
 
25
#include "line-map.h"
26
extern struct line_maps line_table;
27
 
28
/* The location for declarations in "<built-in>" */
29
#define BUILTINS_LOCATION ((source_location) 2)
30
 
31
#ifdef USE_MAPPED_LOCATION
32
 
33
typedef struct
34
{
35
  /* The name of the source file involved.  */
36
  const char *file;
37
 
38
  /* The line-location in the source file.  */
39
  int line;
40
 
41
  int column;
42
} expanded_location;
43
 
44
extern expanded_location expand_location (source_location);
45
 
46
#define UNKNOWN_LOCATION ((source_location) 0)
47
typedef source_location location_t; /* deprecated typedef */
48
typedef source_location source_locus; /* to be removed */
49
 
50
#else /* ! USE_MAPPED_LOCATION */
51
 
52
struct location_s GTY(())
53
{
54
  /* The name of the source file involved.  */
55
  const char *file;
56
 
57
  /* The line-location in the source file.  */
58
  int line;
59
};
60
 
61
typedef struct location_s expanded_location;
62
typedef struct location_s location_t;
63
typedef location_t *source_locus;
64
 
65
#define expand_location(FILELINE) (FILELINE)
66
extern location_t unknown_location;
67
#define UNKNOWN_LOCATION unknown_location
68
 
69
#endif /* ! USE_MAPPED_LOCATION */
70
 
71
struct file_stack
72
{
73
  struct file_stack *next;
74
  location_t location;
75
};
76
 
77
/* Top-level source file.  */
78
extern const char *main_input_filename;
79
 
80
extern location_t input_location;
81
#ifdef USE_MAPPED_LOCATION
82
extern void push_srcloc (location_t);
83
#else /* ! USE_MAPPED_LOCATION */
84
extern void push_srcloc (const char *name, int line);
85
#endif /* ! USE_MAPPED_LOCATION */
86
extern void pop_srcloc (void);
87
extern void restore_input_file_stack (int);
88
 
89
#define LOCATION_FILE(LOC) ((expand_location (LOC)).file)
90
#define LOCATION_LINE(LOC) ((expand_location (LOC)).line)
91
 
92
#define input_line LOCATION_LINE(input_location)
93
#define input_filename LOCATION_FILE(input_location)
94
 
95
/* Stack of currently pending input files.
96
   The line member is not accurate for the innermost file on the stack.  */
97
extern struct file_stack *input_file_stack;
98
 
99
/* Incremented on each change to input_file_stack.  */
100
extern int input_file_stack_tick;
101
 
102
/* The number of bits available for input_file_stack_tick.  */
103
#define INPUT_FILE_STACK_BITS   31
104
 
105
#endif

powered by: WebSVN 2.1.0

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