changeset 18071:d48ef9e24324

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.
author Rik <rik@octave.org>
date Tue, 03 Dec 2013 16:35:04 -0800
parents ff05d5b70411
children b4b5ee91561a
files doc/interpreter/grammar.txi doc/interpreter/var.txi libinterp/parse-tree/lex.ll libinterp/parse-tree/octave.gperf
diffstat 4 files changed, 3 insertions(+), 21 deletions(-) [+]
line wrap: on
line diff
--- 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
--- 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
--- 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;
--- 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