Mercurial > hg > octave-nkf
diff libinterp/parse-tree/lex.ll @ 16123:a484e39d1f22
maint: move function definition in lex.ll
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Tue, 26 Feb 2013 12:43:36 -0500 |
parents | 6884401b2fbb |
children | 3be725cd195b |
line wrap: on
line diff
--- a/libinterp/parse-tree/lex.ll +++ b/libinterp/parse-tree/lex.ll @@ -976,34 +976,6 @@ %% -void -lexical_feedback::reset_parser (void) -{ - // Start off on the right foot. - BEGIN (INITIAL); - - parser_symtab_context.clear (); - - // We do want a prompt by default. - promptflag = 1; - - // Only ask for input from stdin if we are expecting interactive - // input. - - if (! quitting_gracefully - && (interactive || forced_interactive) - && ! (reading_fcn_file - || reading_classdef_file - || reading_script_file - || get_input_from_eval_string - || input_from_startup_file)) - yyrestart (stdin); - - // Clear the buffer for help text. - while (! help_buf.empty ()) - help_buf.pop (); -} - static void display_character (char c) { @@ -1421,6 +1393,34 @@ } } +void +lexical_feedback::reset_parser (void) +{ + // Start off on the right foot. + BEGIN (INITIAL); + + parser_symtab_context.clear (); + + // We do want a prompt by default. + promptflag = 1; + + // Only ask for input from stdin if we are expecting interactive + // input. + + if (! quitting_gracefully + && (interactive || forced_interactive) + && ! (reading_fcn_file + || reading_classdef_file + || reading_script_file + || get_input_from_eval_string + || input_from_startup_file)) + yyrestart (stdin); + + // Clear the buffer for help text. + while (! help_buf.empty ()) + help_buf.pop (); +} + int lexical_feedback::octave_read (char *buf, unsigned max_size) {