Commit f617201f by Diego Novillo Committed by Diego Novillo

Make-lang.in (CXX_PARSER_H): New.


	* Make-lang.in (CXX_PARSER_H): New.
	(cp/parser.o): Add dependency on CXX_PARSER_H.
	Add dependency on tree-pretty-print.h
	(cp/cp-lang.o): Add dependency on CXX_PARSER_H.
	* cp-lang.c: Include parser.h.
	* parser.c: Include parser.h.
	(struct cp_token): Add bitfield purged_p.
	Update all users.
	Move to parser.h.
	(CPP_PURGED): Remove.  Update all users.
	(struct cp_lexer): Change field buffer to be a VEC of cp_token.
	Remove field buffer_length.
	Update all users.
	Move to parser.h.
	(struct tree_check): Move to parser.h.
	(cp_token_position): Likewise.
	(struct cp_token_cache): Likewise.
	(CPP_KEYWORD): Likewise.
	(CPP_TEMPLATE_ID): Likewise.
	(CPP_NESTED_NAME_SPECIFIER): Likewise.
	(N_CP_TTYPES): Likewise.
	(enum cp_parser_status_kind): Likewise.
	(struct cp_parser_context): Likewise.
	(struct cp_default_arg_entry_d): Likewise.
	(struct cp_unparsed_functions_entry_d): Likewise.
	(struct cp_parser): Likewise.
	(cp_lexer_dump_tokens): New.
	(cp_lexer_debug_tokens): New.
	(cp_lexer_finished_p): New.
	(cp_lexer_alloc): Factor out of cp_lexer_new_main.
	(cp_lexer_new_main): Re-write main lexing loop to push
	tokens into the new VEC buffer.
	(cp_lexer_print_token): Improve printing of CPP_NUMBER tokens.
	Do not abort if the token type is not recognized, just print
	its code.
	* parser.h: New file.
	* config-lang.in (gtfiles): Add cp/parser.h.

From-SVN: r171075
parent 7b5cb7d6
2011-03-16 Diego Novillo <dnovillo@google.com>
* Make-lang.in (CXX_PARSER_H): New.
(cp/parser.o): Add dependency on CXX_PARSER_H.
Add dependency on tree-pretty-print.h
(cp/cp-lang.o): Add dependency on CXX_PARSER_H.
* cp-lang.c: Include parser.h.
* parser.c: Include parser.h.
(struct cp_token): Add bitfield purged_p.
Update all users.
Move to parser.h.
(CPP_PURGED): Remove. Update all users.
(struct cp_lexer): Change field buffer to be a VEC of cp_token.
Remove field buffer_length.
Update all users.
Move to parser.h.
(struct tree_check): Move to parser.h.
(cp_token_position): Likewise.
(struct cp_token_cache): Likewise.
(CPP_KEYWORD): Likewise.
(CPP_TEMPLATE_ID): Likewise.
(CPP_NESTED_NAME_SPECIFIER): Likewise.
(N_CP_TTYPES): Likewise.
(enum cp_parser_status_kind): Likewise.
(struct cp_parser_context): Likewise.
(struct cp_default_arg_entry_d): Likewise.
(struct cp_unparsed_functions_entry_d): Likewise.
(struct cp_parser): Likewise.
(cp_lexer_dump_tokens): New.
(cp_lexer_debug_tokens): New.
(cp_lexer_finished_p): New.
(cp_lexer_alloc): Factor out of cp_lexer_new_main.
(cp_lexer_new_main): Re-write main lexing loop to push
tokens into the new VEC buffer.
(cp_lexer_print_token): Improve printing of CPP_NUMBER tokens.
Do not abort if the token type is not recognized, just print
its code.
* parser.h: New file.
* config-lang.in (gtfiles): Add cp/parser.h.
2011-03-16 Jason Merrill <jason@redhat.com>
Core 1148
......
......@@ -243,7 +243,7 @@ CXX_TREE_H = $(TREE_H) cp/name-lookup.h cp/cp-tree.h $(C_COMMON_H) \
$(FUNCTION_H) \
$(SYSTEM_H) coretypes.h $(CONFIG_H) $(TARGET_H) $(GGC_H) \
$(srcdir)/../include/hashtab.h
CXX_PARSER_H = tree.h c-family/c-pragma.h cp/parser.h
CXX_PRETTY_PRINT_H = cp/cxx-pretty-print.h $(C_PRETTY_PRINT_H)
cp/lex.o: cp/lex.c $(CXX_TREE_H) $(TM_H) $(FLAGS_H) \
......@@ -251,7 +251,7 @@ cp/lex.o: cp/lex.c $(CXX_TREE_H) $(TM_H) $(FLAGS_H) \
c-family/c-objc.h
cp/cp-lang.o: cp/cp-lang.c $(CXX_TREE_H) $(TM_H) debug.h langhooks.h \
$(LANGHOOKS_DEF_H) $(C_COMMON_H) gtype-cp.h gt-cp-cp-lang.h \
cp/cp-objcp-common.h $(EXPR_H) $(TARGET_H)
cp/cp-objcp-common.h $(EXPR_H) $(TARGET_H) $(CXX_PARSER_H)
cp/decl.o: cp/decl.c $(CXX_TREE_H) $(TM_H) $(FLAGS_H) cp/decl.h \
output.h toplev.h $(HASHTAB_H) $(RTL_H) \
cp/operators.def $(TM_P_H) $(TREE_INLINE_H) $(DIAGNOSTIC_H) $(C_PRAGMA_H) \
......@@ -316,7 +316,7 @@ cp/mangle.o: cp/mangle.c $(CXX_TREE_H) $(TM_H) $(REAL_H) \
gt-cp-mangle.h $(TARGET_H) $(TM_P_H) $(CGRAPH_H)
cp/parser.o: cp/parser.c $(CXX_TREE_H) $(TM_H) $(DIAGNOSTIC_CORE_H) \
gt-cp-parser.h output.h $(TARGET_H) $(PLUGIN_H) intl.h \
c-family/c-objc.h
c-family/c-objc.h tree-pretty-print.h $(CXX_PARSER_H)
cp/cp-gimplify.o: cp/cp-gimplify.c $(CXX_TREE_H) $(C_COMMON_H) \
$(TM_H) coretypes.h pointer-set.h tree-iterator.h
......
......@@ -30,4 +30,4 @@ compilers="cc1plus\$(exeext)"
target_libs="target-libstdc++-v3"
gtfiles="\$(srcdir)/cp/rtti.c \$(srcdir)/cp/mangle.c \$(srcdir)/cp/name-lookup.h \$(srcdir)/cp/name-lookup.c \$(srcdir)/cp/cp-tree.h \$(srcdir)/cp/decl.h \$(srcdir)/cp/call.c \$(srcdir)/cp/decl.c \$(srcdir)/cp/decl2.c \$(srcdir)/cp/pt.c \$(srcdir)/cp/repo.c \$(srcdir)/cp/semantics.c \$(srcdir)/cp/tree.c \$(srcdir)/cp/parser.c \$(srcdir)/cp/method.c \$(srcdir)/cp/typeck2.c \$(srcdir)/c-family/c-common.c \$(srcdir)/c-family/c-common.h \$(srcdir)/c-family/c-objc.h \$(srcdir)/c-family/c-lex.c \$(srcdir)/c-family/c-pragma.h \$(srcdir)/c-family/c-pragma.c \$(srcdir)/cp/class.c \$(srcdir)/cp/cp-objcp-common.c \$(srcdir)/cp/cp-lang.c"
gtfiles="\$(srcdir)/cp/rtti.c \$(srcdir)/cp/mangle.c \$(srcdir)/cp/name-lookup.h \$(srcdir)/cp/name-lookup.c \$(srcdir)/cp/cp-tree.h \$(srcdir)/cp/decl.h \$(srcdir)/cp/call.c \$(srcdir)/cp/decl.c \$(srcdir)/cp/decl2.c \$(srcdir)/cp/pt.c \$(srcdir)/cp/repo.c \$(srcdir)/cp/semantics.c \$(srcdir)/cp/tree.c \$(srcdir)/cp/parser.h \$(srcdir)/cp/parser.c \$(srcdir)/cp/method.c \$(srcdir)/cp/typeck2.c \$(srcdir)/c-family/c-common.c \$(srcdir)/c-family/c-common.h \$(srcdir)/c-family/c-objc.h \$(srcdir)/c-family/c-lex.c \$(srcdir)/c-family/c-pragma.h \$(srcdir)/c-family/c-pragma.c \$(srcdir)/cp/class.c \$(srcdir)/cp/cp-objcp-common.c \$(srcdir)/cp/cp-lang.c"
......@@ -32,6 +32,7 @@ along with GCC; see the file COPYING3. If not see
#include "cp-objcp-common.h"
#include "hashtab.h"
#include "target.h"
#include "parser.h"
enum c_language_kind c_language = clk_cxx;
static void cp_init_ts (void);
......
This diff is collapsed. Click to expand it.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment