# HG changeset patch # User John W. Eaton # Date 1361900616 18000 # Node ID a484e39d1f223a29142d7b4571019c6e8e390a79 # Parent 6884401b2fbbec9a2ffdcb6f446c6b2ea095f949 maint: move function definition in lex.ll 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 @@ -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) {