* parser.c (cp_token_position): New typedef. Define VEC thereof. (struct cp_lexer): Allow buffer and buffer_end to be NULL. Make next_token and last_token cp_token_position. Make saved_tokens a VEC(cp_token_position). (eof_token): New static variable. (CP_SAVED_TOKENS_SIZE): Rename to ... (CP_SAVED_TOKEN_STACK): ... here. (cp_lexer_new_main): Adjust main lexer creation and buffer filling. (cp_lexer_new_from_tokens): Do not copy the tokens, merely point to the parent buffer. Do not append eof token. (cp_lexer_destroy): Only free buffer if non-NULL. Free token stack. (cp_lexer_next_token, cp_lexer_prev_token): Remove. (cp_lexer_token_position, cp_lexer_token_at): New. (cp_lexer_saving_tokens): Adjust. Make inline. (cp_lexer_advance_token, cp_lexer_token_difference): Remove. (cp_lexer_peek_token_emit_debug_info): Fold into ... (cp_lexer_peek_token): ... here. (cp_lexer_peek_nth_token): Don't peek past EOF. (cp_lexer_consume_token): Set next_token to eof_token, if reaching EOF. (cp_lexer_purge_token): Adjust eof setting. (cp_lexer_purge_tokens_after): Likewise. (cp_lexer_save_tokens): Push next_token directly. (cp_lexer_commit_tokens): Adjust. (cp_lexer_rollback_tokens): Pop next_token directly. (cp_parser_check_for_invalid_template_id): Adjust token purging. (cp_parser_translation_unit): Do not consume the EOF. (cp_parser_nested_name_specifier_opt): Adjust token purging. (cp_parser_template_id, cp_parser_template_name): Likewise. From-SVN: r89320
Name |
Last commit
|
Last update |
---|---|---|
INSTALL | Loading commit data... | |
boehm-gc | Loading commit data... | |
config | Loading commit data... | |
contrib | Loading commit data... | |
fastjar | Loading commit data... | |
fixincludes | Loading commit data... | |
gcc | Loading commit data... | |
include | Loading commit data... | |
intl | Loading commit data... | |
libada | Loading commit data... | |
libcpp | Loading commit data... | |
libffi | Loading commit data... | |
libgfortran | Loading commit data... | |
libiberty | Loading commit data... | |
libjava | Loading commit data... | |
libmudflap | Loading commit data... | |
libobjc | Loading commit data... | |
libstdc++-v3 | Loading commit data... | |
maintainer-scripts | Loading commit data... | |
zlib | Loading commit data... | |
.cvsignore | Loading commit data... | |
ABOUT-NLS | Loading commit data... | |
COPYING | Loading commit data... | |
COPYING.LIB | Loading commit data... | |
ChangeLog | Loading commit data... | |
ChangeLog.tree-ssa | Loading commit data... | |
MAINTAINERS | Loading commit data... | |
Makefile.def | Loading commit data... | |
Makefile.in | Loading commit data... | |
Makefile.tpl | Loading commit data... | |
README | Loading commit data... | |
README.SCO | Loading commit data... | |
compile | Loading commit data... | |
config-ml.in | Loading commit data... | |
config.guess | Loading commit data... | |
config.if | Loading commit data... | |
config.rpath | Loading commit data... | |
config.sub | Loading commit data... | |
configure | Loading commit data... | |
configure.in | Loading commit data... | |
depcomp | Loading commit data... | |
install-sh | Loading commit data... | |
libtool.m4 | Loading commit data... | |
ltcf-c.sh | Loading commit data... | |
ltcf-cxx.sh | Loading commit data... | |
ltcf-gcj.sh | Loading commit data... | |
ltconfig | Loading commit data... | |
ltmain.sh | Loading commit data... | |
missing | Loading commit data... | |
mkdep | Loading commit data... | |
mkinstalldirs | Loading commit data... | |
move-if-change | Loading commit data... | |
symlink-tree | Loading commit data... | |
ylwrap | Loading commit data... |