Mercurial > hg > octave-nkf
changeset 16117:771186909285
maint: move class definition in lex.ll
* lex.ll: Move flex_stream_reader definition just before
lexical_feedback member functions.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Tue, 26 Feb 2013 11:47:59 -0500 |
parents | 67f71e2a6190 |
children | f8e463523229 |
files | libinterp/parse-tree/lex.ll |
diffstat | 1 files changed, 24 insertions(+), 24 deletions(-) [+] |
line wrap: on
line diff
--- a/libinterp/parse-tree/lex.ll +++ b/libinterp/parse-tree/lex.ll @@ -1233,30 +1233,6 @@ delete_buffer (static_cast<YY_BUFFER_STATE> (buf)); } -class -flex_stream_reader : public stream_reader -{ -public: - flex_stream_reader (lexical_feedback *l, char *buf_arg) - : lexer (l), stream_reader (), buf (buf_arg) - { } - - int getc (void) { return lexer->text_yyinput (); } - int ungetc (int c) { lexer->xunput (c, buf); return 0; } - -private: - - // No copying! - - flex_stream_reader (const flex_stream_reader&); - - flex_stream_reader& operator = (const flex_stream_reader&); - - lexical_feedback *lexer; - - char *buf; -}; - // Return 1 if the given character matches any character in the given // string. @@ -1652,6 +1628,30 @@ return retval; } +class +flex_stream_reader : public stream_reader +{ +public: + flex_stream_reader (lexical_feedback *l, char *buf_arg) + : stream_reader (), lexer (l), buf (buf_arg) + { } + + int getc (void) { return lexer->text_yyinput (); } + int ungetc (int c) { lexer->xunput (c, buf); return 0; } + +private: + + // No copying! + + flex_stream_reader (const flex_stream_reader&); + + flex_stream_reader& operator = (const flex_stream_reader&); + + lexical_feedback *lexer; + + char *buf; +}; + lexical_feedback::~lexical_feedback (void) { // Clear out the stack of token info used to track line and