#include "parser.h"
#include "diagnostic.h"
#include "format_check.h"
-#include "lexer.h"
+#include "preprocessor.h"
#include "symbol_t.h"
#include "token_t.h"
#include "types.h"
#define POP_EXTENSION() \
((void)(in_gcc_extension = old_gcc_extension))
-/** special symbol used for anonymous entities. */
-static symbol_t *sym_anonymous = NULL;
-
/** The token anchor set */
static unsigned short token_anchor_set[T_LAST_TOKEN];
static inline void next_token(void)
{
token = lookahead_buffer[lookahead_bufpos];
- lookahead_buffer[lookahead_bufpos] = lexer_token;
- lexer_next_token();
+ lookahead_buffer[lookahead_bufpos] = pp_token;
+ next_preprocessing_token();
lookahead_bufpos = (lookahead_bufpos + 1) % MAX_LOOKAHEAD;
static void check_integer_suffix(expression_t *const expr, char const *const suffix)
{
- specifiers_t spec = SPECIFIER_NONE;
+ unsigned spec = SPECIFIER_NONE;
char const *c = suffix;
for (;;) {
specifiers_t add;
*/
void init_parser(void)
{
- sym_anonymous = symbol_table_insert("<anonymous>");
-
memset(token_anchor_set, 0, sizeof(token_anchor_set));
init_expression_parsers();