Mercurial > octave-nkf
diff libinterp/parse-tree/lex.ll @ 16120:4b68eb9b98b0
move octave_read lexer helper function to lexical_feedback class
* lex.h, lex.ll (octave_read): Declare as member of lexical_feedback
class. Change all callers.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Tue, 26 Feb 2013 12:24:54 -0500 |
parents | b31eb56f4d84 |
children | bdf365c5c9bf |
line wrap: on
line diff
--- a/libinterp/parse-tree/lex.ll Tue Feb 26 12:01:54 2013 -0500 +++ b/libinterp/parse-tree/lex.ll Tue Feb 26 12:24:54 2013 -0500 @@ -103,7 +103,7 @@ #undef YY_INPUT #endif #define YY_INPUT(buf, result, max_size) \ - result = octave_read (buf, max_size) + result = curr_lexer->octave_read (buf, max_size) // Try to avoid crashing out completely on fatal scanner errors. // The call to yy_fatal_error should never happen, but it avoids a @@ -225,7 +225,6 @@ // file that are needed inside the lexer actions. static std::string strip_trailing_whitespace (char *s); -static int octave_read (char *buf, unsigned int max_size); %} @@ -1359,8 +1358,8 @@ return retval; } -static int -octave_read (char *buf, unsigned max_size) +int +lexical_feedback::octave_read (char *buf, unsigned max_size) { static const char * const eol = "\n"; static std::string input_buf;