# HG changeset patch # User Rik # Date 1386117304 28800 # Node ID d48ef9e24324b33b1878b67e341883aa98098e1e # Parent ff05d5b70411a74dc11de04794189e157890e42d maint: Remove deprecated keyword static. * lex.ll: Remove static_kw processing. * octave.gperf: Remove static_kw form list of keywords. * grammar.txi: Remove static from list of Octave keywords. * var.txi: Remove documentation mentioning static as synonym for persistent. diff -r ff05d5b70411 -r d48ef9e24324 doc/interpreter/grammar.txi --- a/doc/interpreter/grammar.txi Tue Dec 03 15:59:56 2013 -0800 +++ b/doc/interpreter/grammar.txi Tue Dec 03 16:35:04 2013 -0800 @@ -49,9 +49,8 @@ @item @code{function} @tab @code{global} @tab @code{if} @item @code{methods} @tab @code{otherwise} @tab @code{parfor} @item @code{persistent} @tab @code{properties} @tab @code{return} -@item @code{static} @tab @code{switch} @tab @code{try} -@item @code{until} @tab @code{unwind_protect} @tab @code{unwind_protect_cleanup} -@item @code{while} +@item @code{switch} @tab @code{try} @tab @code{until} +@item @code{unwind_protect} @tab @code{unwind_protect_cleanup} @tab @code{while} @end multitable The function @code{iskeyword} can be used to quickly check whether an diff -r ff05d5b70411 -r d48ef9e24324 doc/interpreter/var.txi --- a/doc/interpreter/var.txi Tue Dec 03 15:59:56 2013 -0800 +++ b/doc/interpreter/var.txi Tue Dec 03 16:35:04 2013 -0800 @@ -221,8 +221,7 @@ @end example The behavior of persistent variables is equivalent to the behavior of -static variables in C@. The command @code{static} in Octave is also -recognized and is equivalent to @code{persistent}. +static variables in C@. Like global variables, a persistent variable may only be initialized once. For example, after executing the following code diff -r ff05d5b70411 -r d48ef9e24324 libinterp/parse-tree/lex.ll --- a/libinterp/parse-tree/lex.ll Tue Dec 03 15:59:56 2013 -0800 +++ b/libinterp/parse-tree/lex.ll Tue Dec 03 16:35:04 2013 -0800 @@ -2224,20 +2224,6 @@ at_beginning_of_statement = true; break; - case static_kw: - if ((reading_fcn_file || reading_script_file - || reading_classdef_file) - && ! fcn_file_full_name.empty ()) - warning_with_id ("Octave:deprecated-keyword", - "the 'static' keyword is obsolete and will be removed from a future version of Octave; please use 'persistent' instead; near line %d of file '%s'", - input_line_number, - fcn_file_full_name.c_str ()); - else - warning_with_id ("Octave:deprecated-keyword", - "the 'static' keyword is obsolete and will be removed from a future version of Octave; please use 'persistent' instead; near line %d", - input_line_number); - // fall through ... - case persistent_kw: case global_kw: looking_at_decl_list = true; diff -r ff05d5b70411 -r d48ef9e24324 libinterp/parse-tree/octave.gperf --- a/libinterp/parse-tree/octave.gperf Tue Dec 03 15:59:56 2013 -0800 +++ b/libinterp/parse-tree/octave.gperf Tue Dec 03 16:35:04 2013 -0800 @@ -64,7 +64,6 @@ properties_kw, return_kw, set_kw, - static_kw, switch_kw, try_kw, until_kw, @@ -111,7 +110,6 @@ properties, PROPERTIES, properties_kw return, FUNC_RET, return_kw set, SET, set_kw -static, PERSISTENT, static_kw switch, SWITCH, switch_kw try, TRY, try_kw until, UNTIL, until_kw