# HG changeset patch # User John W. Eaton # Date 1363155950 14400 # Node ID 6ce905b89cee5645a2dc4cd541509c59b6a58942 # Parent c22a6cecaeddcdccede33876e6c6b1dfcf6841d6 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. diff --git a/libinterp/interpfcn/toplev.cc b/libinterp/interpfcn/toplev.cc --- 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, ()); diff --git a/libinterp/parse-tree/lex.h b/libinterp/parse-tree/lex.h --- 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 diff --git a/libinterp/parse-tree/lex.ll b/libinterp/parse-tree/lex.ll --- 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) {