comparison src/oct-parse.yy @ 12408:187d48827b47 release-3-4-x

don't warn about coercing nested functions to subfunctions if yyparse failed
author John W. Eaton <jwe@octave.org>
date Tue, 08 Feb 2011 03:22:12 -0500
parents 1b71befc2f40
children 7a5aacf65f81
comparison
equal deleted inserted replaced
12407:75049b56fa35 12408:187d48827b47
3587 3587
3588 delete global_command; 3588 delete global_command;
3589 3589
3590 fcn_ptr = primary_fcn_ptr; 3590 fcn_ptr = primary_fcn_ptr;
3591 3591
3592 if (reading_fcn_file && endfunction_found && max_function_depth > 1) 3592 if (status != 0)
3593 error ("parse error while reading %s file %s",
3594 file_type.c_str(), ff.c_str ());
3595 else if (reading_fcn_file && endfunction_found
3596 && max_function_depth > 1)
3593 warning_with_id ("Octave:nested-functions-coerced", 3597 warning_with_id ("Octave:nested-functions-coerced",
3594 "nested functions are coerced into subfunctions " 3598 "nested functions are coerced into subfunctions "
3595 "in file %s", ff.c_str ()); 3599 "in file %s", ff.c_str ());
3596
3597 if (status != 0)
3598 error ("parse error while reading %s file %s",
3599 file_type.c_str(), ff.c_str ());
3600 } 3600 }
3601 else 3601 else
3602 { 3602 {
3603 tree_statement *end_of_script 3603 tree_statement *end_of_script
3604 = make_end ("endscript", input_line_number, current_input_column); 3604 = make_end ("endscript", input_line_number, current_input_column);