slightly simplify wchar_t handling
[cparser] / parser.c
index 986b831..53f8fa2 100644 (file)
--- a/parser.c
+++ b/parser.c
@@ -28,7 +28,7 @@
 #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"
@@ -139,9 +139,6 @@ static elf_visibility_tag_t default_visibility = ELF_VISIBILITY_DEFAULT;
 #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];
 
@@ -470,8 +467,8 @@ static size_t label_top(void)
 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;
 
@@ -5716,7 +5713,7 @@ static void warn_traditional_suffix(char const *const suffix)
 
 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;
@@ -10332,8 +10329,6 @@ void parse(void)
  */
 void init_parser(void)
 {
-       sym_anonymous = symbol_table_insert("<anonymous>");
-
        memset(token_anchor_set, 0, sizeof(token_anchor_set));
 
        init_expression_parsers();