# HG changeset patch # User John W. Eaton # Date 1361899494 18000 # Node ID 4b68eb9b98b019a5c25e4d3b055ff347858af506 # Parent b31eb56f4d845b3f099af1d822541626d6b0f1cf 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. diff -r b31eb56f4d84 -r 4b68eb9b98b0 libinterp/parse-tree/lex.h --- a/libinterp/parse-tree/lex.h Tue Feb 26 12:01:54 2013 -0500 +++ b/libinterp/parse-tree/lex.h Tue Feb 26 12:24:54 2013 -0500 @@ -205,6 +205,8 @@ looking_at_object_index.push_front (false); } + int octave_read (char *buf, unsigned int max_size); + void do_comma_insert_check (void); int text_yyinput (void); diff -r b31eb56f4d84 -r 4b68eb9b98b0 libinterp/parse-tree/lex.ll --- 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;