Mercurial > hg > octave-nkf
changeset 16292:6ce905b89cee
delete unused obsolete code
* lex.h, lex.ll (stream_reader): Delete unused class declaration.
(cleanup_parser): Delete unused function and declaration.
(match_any): Delete unused static function.
* toplev.cc (do_octave_atexit): Don't call cleanup_parser.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Wed, 13 Mar 2013 02:25:50 -0400 |
parents | c22a6cecaedd |
children | 57e87ddfee14 |
files | libinterp/interpfcn/toplev.cc libinterp/parse-tree/lex.h libinterp/parse-tree/lex.ll |
diffstat | 3 files changed, 0 insertions(+), 42 deletions(-) [+] |
line wrap: on
line diff
--- a/libinterp/interpfcn/toplev.cc +++ b/libinterp/interpfcn/toplev.cc @@ -1058,8 +1058,6 @@ OCTAVE_SAFE_CALL (symbol_table::cleanup, ()); - OCTAVE_SAFE_CALL (cleanup_parser, ()); - OCTAVE_SAFE_CALL (sysdep_cleanup, ()); OCTAVE_SAFE_CALL (flush_octave_stdout, ());
--- a/libinterp/parse-tree/lex.h +++ b/libinterp/parse-tree/lex.h @@ -33,29 +33,9 @@ #include "input.h" #include "token.h" -extern OCTINTERP_API void cleanup_parser (void); - // Is the given string a keyword? extern bool is_keyword (const std::string& s); -class -stream_reader -{ -public: - virtual int getc (void) = 0; - virtual int ungetc (int c) = 0; - -protected: - stream_reader (void) { } - ~stream_reader (void) { } - -private: - - // No copying! - stream_reader (const stream_reader&); - stream_reader& operator = (const stream_reader&); -}; - // For communication between the lexer and parser. class
--- a/libinterp/parse-tree/lex.ll +++ b/libinterp/parse-tree/lex.ll @@ -1291,26 +1291,6 @@ } } -void -cleanup_parser (void) -{ -} - -// Return 1 if the given character matches any character in the given -// string. - -static bool -match_any (char c, const char *s) -{ - char tmp; - while ((tmp = *s++) != '\0') - { - if (c == tmp) - return true; - } - return false; -} - bool is_keyword (const std::string& s) {