/* Represents the contents of a file cpplib has read in. */ struct cpp_buffer { const unsigned char *cur; /* Current location. */ const unsigned char *line_base; /* Start of current physical line. */ const unsigned char *next_line; /* Start of to-be-cleaned logical line. */
const unsigned char *buf; /* Entire character buffer. */ const unsigned char *rlimit; /* Writable byte at end of file. */ const unsigned char *to_free; /* Pointer that should be freed when popping the buffer. */
_cpp_line_note *notes; /* Array of notes. */ unsigned int cur_note; /* Next note to process. */ unsigned int notes_used; /* Number of notes. */ unsigned int notes_cap; /* Size of allocated array. */
struct cpp_buffer *prev;
/* Pointer into the file table; non-NULL if this is a file buffer. Used for include_next and to record control macros. */ struct _cpp_file *file;
/* Saved value of __TIMESTAMP__ macro - date and time of last modification of the assotiated file. */ const unsigned char *timestamp;
/* Value of if_stack at start of this file. Used to prohibit unmatched #endif (etc) in an include file. */ struct if_stack *if_stack;
/* True if we need to get the next clean line. */ bool need_line;
/* True if we have already warned about C++ comments in this file. The warning happens only for C89 extended mode with -pedantic on, or for -Wtraditional, and only once per file (otherwise it would be far too noisy). */ unsigned int warned_cplusplus_comments : 1;
/* True if we don't process trigraphs and escaped newlines. True for preprocessed input, command line directives, and _Pragma buffers. */ unsigned int from_stage3 : 1;
/* At EOF, a buffer is automatically popped. If RETURN_AT_EOF is true, a CPP_EOF token is then returned. Otherwise, the next token from the enclosing buffer is returned. */ unsigned int return_at_eof : 1;
/* One for a system header, two for a C system header file that therefore needs to be extern "C" protected in C++, and zero otherwise. */ unsigned char sysp;
/* The directory of the this buffer's file. Its NAME member is not allocated, so we don't need to worry about freeing it. */ struct cpp_dir dir;
/* Descriptor for converting from the input character set to the source character set. */ struct cset_converter input_cset_desc; };
GCC主要数据结构之cpp_buffer
最新推荐文章于 2022-08-01 18:55:15 发布