Mercurial > hg > octave-nkf
diff src/oct-parse.yy @ 11586:12df7854fa7c
strip trailing whitespace from source files
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Thu, 20 Jan 2011 17:24:59 -0500 |
parents | 7d6d8c1e471f |
children | 91fa3871e9bf |
line wrap: on
line diff
--- a/src/oct-parse.yy +++ b/src/oct-parse.yy @@ -637,10 +637,10 @@ : SUPERCLASSREF { $$ = new tree_identifier ($1->line (), $1->column ()); } ; - + meta_identifier : METAQUERY { $$ = new tree_identifier ($1->line (), $1->column ()); } - ; + ; string : DQ_STRING { $$ = make_constant (DQ_STRING, $1); } @@ -737,7 +737,7 @@ anon_fcn_handle : '@' param_list statement { $$ = make_anon_fcn_handle ($2, $3); } ; - + primary_expr : identifier { $$ = $1; } | constant @@ -1108,7 +1108,7 @@ { $1->append ($2); $$ = $1; - } + } ; case_list1 : switch_case @@ -1355,8 +1355,8 @@ { $$ = $3; - if (reading_classdef_file || lexer_flags.parsing_classdef) - lexer_flags.maybe_classdef_get_set_method = true; + if (reading_classdef_file || lexer_flags.parsing_classdef) + lexer_flags.maybe_classdef_get_set_method = true; } ; @@ -1378,7 +1378,7 @@ lexer_flags.parsed_function_name.top () = true; lexer_flags.maybe_classdef_get_set_method = false; - + $$ = $1; } | GET '.' identifier @@ -1587,7 +1587,7 @@ class_event : identifier { $$ = 0; } ; - + // ============= // Miscellaneous // ============= @@ -1717,19 +1717,19 @@ break; case token::switch_end: - error (fmt, type, "endswitch", l, c); + error (fmt, type, "endswitch", l, c); break; case token::while_end: - error (fmt, type, "endwhile", l, c); + error (fmt, type, "endwhile", l, c); break; case token::try_catch_end: - error (fmt, type, "end_try_catch", l, c); + error (fmt, type, "end_try_catch", l, c); break; case token::unwind_protect_end: - error (fmt, type, "end_unwind_protect", l, c); + error (fmt, type, "end_unwind_protect", l, c); break; default: @@ -2920,7 +2920,7 @@ if (reading_fcn_file && current_function_depth == 1 && ! parsing_subfunctions) primary_fcn_ptr = fcn; - + return fcn; } @@ -3009,7 +3009,7 @@ char type) { tree_index_expression *retval = 0; - + if (args && args->has_magic_tilde ()) { yyerror ("invalid use of empty argument (~) in index expression"); @@ -3277,7 +3277,7 @@ if (! s.empty ()) { size_t offset = s.find_first_not_of (" \t"); - + retval = (s.substr (offset, 9) == "Copyright"); } @@ -3322,7 +3322,7 @@ return ::ungetc (c, f); } - + private: FILE *f; }; @@ -3559,7 +3559,7 @@ // Do this with an unwind-protect cleanup function so that // the forced variables will be unmarked in the event of an - // interrupt. + // interrupt. symbol_table::scope_id scope = symbol_table::top_scope (); frame.add_fcn (symbol_table::unmark_forced_variables, scope); @@ -3605,7 +3605,7 @@ else if (require_file) error ("no such file, `%s'", ff.c_str ()); else if (! warn_for.empty ()) - error ("%s: unable to open file `%s'", warn_for.c_str (), ff.c_str ()); + error ("%s: unable to open file `%s'", warn_for.c_str (), ff.c_str ()); return fcn_ptr; } @@ -3671,7 +3671,7 @@ return retval; } -string_vector +string_vector autoloaded_functions (void) { string_vector names (autoload_map.size()); @@ -3759,8 +3759,8 @@ curr_fcn_file_name = nm; curr_fcn_file_full_name = file.substr (0, len - 2); - octave_function *tmpfcn = parse_fcn_file (file.substr (0, len - 2), - dispatch_type, autoloading, + octave_function *tmpfcn = parse_fcn_file (file.substr (0, len - 2), + dispatch_type, autoloading, false); retval = octave_dynamic_loader::load_mex (nm, file, fcn_file_from_relative_lookup); @@ -3978,7 +3978,7 @@ if (! error_state) frame.add_fcn (octave_call_stack::pop); - } + } if (! error_state) { @@ -4121,7 +4121,7 @@ // Evaluate an Octave function (built-in or interpreted) and return // the list of result values. NAME is the name of the function to // call. ARGS are the arguments to the function. NARGOUT is the -// number of output arguments expected. +// number of output arguments expected. octave_value_list feval (const std::string& name, const octave_value_list& args, int nargout) @@ -4244,14 +4244,14 @@ another function for the given type signature.\n\ @end deftypefn") { - octave_value_list retval; + octave_value_list retval; int nargin = args.length (); if (nargin > 0) { const std::string name (args(0).string_value ()); - + if (! error_state) { octave_value fcn = symbol_table::builtin_find (name);