diff libinterp/parse-tree/oct-parse.yy @ 16138:284e2ca86ef7

execute parser using member function of octave_parser class * parse.h, oct-parse.yy (octave_parser::run): New function. (octave_parse_input): Delete. * toplev.cc (main_loop): Call octave_parser::run for curr_parser instead of calling octave_parse_input. * input.cc (get_debug_input): Likewise. * oct-parse.yy (eval_string, parse_fcn_file): Likewise.
author John W. Eaton <jwe@octave.org>
date Wed, 27 Feb 2013 13:07:38 -0500
parents ed36d5543b27
children 2fd39ab12209
line wrap: on
line diff
--- a/libinterp/parse-tree/oct-parse.yy	Wed Feb 27 09:26:26 2013 -0800
+++ b/libinterp/parse-tree/oct-parse.yy	Wed Feb 27 13:07:38 2013 -0500
@@ -1540,6 +1540,12 @@
   parse_error ("%s", msg.c_str ());
 }
 
+int
+octave_parser::run (void)
+{
+  return octave_parse ();
+}
+
 // Error mesages for mismatched end tokens.
 
 void
@@ -3424,7 +3430,7 @@
 
           global_command = 0;
 
-          int status = octave_parse_input ();
+          int status = curr_parser->run ();
 
           // Use an unwind-protect cleanup function so that the
           // global_command list will be deleted in the event of an
@@ -4196,7 +4202,7 @@
       symbol_table::scope_id scope = symbol_table::top_scope ();
       frame.add_fcn (symbol_table::unmark_forced_variables, scope);
 
-      parse_status = octave_parse_input ();
+      parse_status = curr_parser->run ();
 
       tree_statement_list *command_list = global_command;
 
@@ -4305,12 +4311,6 @@
     }
 }
 
-int
-octave_parse_input (void)
-{
-  return octave_parse ();
-}
-
 DEFUN (eval, args, nargout,
   "-*- texinfo -*-\n\
 @deftypefn  {Built-in Function} {} eval (@var{try})\n\