diff libinterp/parse-tree/lex.ll @ 20956:9db35d2042be

maint: eliminate special cases of statements after error. * daspk.cc: Eliminate DASPK_ABORT, DASPK_ABORT1, DASPK_ABORT2 macros. * dasrt.cc: Eliminate DASRT_ABORT, DASRT_ABORT1, DASRT_ABORT2 macros. * dassl.cc: Eliminate DASSL_ABORT, DASSL_ABORT1, DASSL_ABORT2 macros. libinterp/corefcn/graphics.cc (Fdrawnow): Reverse order and call gh_manager::unlock() before call to error(). * variables.cc (Fmlock): Adjust indentation. * __glpk__.cc (glpk): Add FIXME note about unreachable code. * __init_fltk__.cc (F__fltk_check__, F__init_fltk__): Place return statement within #ifdef HAVE_FLTK block. * ov-fcn-handle.cc (load_hdf5): eliminate useless statements after error. * ov-java.cc (F__java_exit__): Place return statement within #ifdef HAVE_JAVA block. * octave.cc (octave_process_command_line): Issue warning, which will return, and then call octave_print_terse_usage_and_exit. * lex.ll: Add FIXME notes about unreachable code. * oct-parse.in.yy (source_file): Eliminate useless return after error.
author Rik <rik@octave.org>
date Sun, 20 Dec 2015 15:31:53 -0800 (2015-12-20)
parents 7697a3433e37
children ec532a439c6f
line wrap: on
line diff
--- a/libinterp/parse-tree/lex.ll
+++ b/libinterp/parse-tree/lex.ll
@@ -1007,6 +1007,7 @@
 
     error ("unterminated character string constant");
 
+    // FIXME: This is no longer reachable now that error is exception based.
     return LEXICAL_ERROR;
   }
 
@@ -1059,6 +1060,7 @@
 
     error ("unterminated character string constant");
 
+    // FIXME: This is no longer reachable now that error is exception based.
     return LEXICAL_ERROR;
   }
 
@@ -2870,6 +2872,7 @@
   if (kw_token)
     {
       error ("method, class, and package names may not be keywords");
+      // FIXME: This is no longer reachable now that error is exception based.
       return LEXICAL_ERROR;
     }
 
@@ -2889,6 +2892,7 @@
   if (fq_identifier_contains_keyword (cls))
     {
       error ("class and package names may not be keywords");
+      // FIXME: This is no longer reachable now that error is exception based.
       return LEXICAL_ERROR;
     }
 
@@ -2908,6 +2912,7 @@
   if (fq_identifier_contains_keyword (tok))
     {
       error ("function, method, class, and package names may not be keywords");
+      // FIXME: This is no longer reachable now that error is exception based.
       return LEXICAL_ERROR;
     }
 
@@ -2957,7 +2962,7 @@
       if (kw_token)
         {
           error ("function handles may not refer to keywords");
-
+          // FIXME: This is no longer reachable now that error is exception based.
           return LEXICAL_ERROR;
         }
       else
@@ -3251,6 +3256,7 @@
 {
   error (msg);
 
+  // FIXME: This is no longer reachable now that error is exception based.
   OCTAVE_QUIT;
 
   yy_fatal_error (msg, scanner);