]> Kevux Git Server - fll/commitdiff
Update: add f_unterminated* status codes and fix f_unterminated_nest status codes
authorKevin Day <thekevinday@gmail.com>
Wed, 19 Feb 2020 01:51:17 +0000 (19:51 -0600)
committerKevin Day <thekevinday@gmail.com>
Wed, 19 Feb 2020 01:51:49 +0000 (19:51 -0600)
Add basic f_unterminated status codes just like f_unterminated_group status codes.
Fix missing status code conversions for f_unterminated_nest.

level_0/f_status/c/status.h
level_1/fl_status/c/status.c
level_1/fl_status/c/status.h
level_2/fll_status/c/status.c

index d1922b278d82ae6327ca2fcd88d545c1f1bd771a..e3b57d466c8d91690ce719deec2e9cc82a4bad76 100644 (file)
@@ -234,6 +234,11 @@ extern "C" {
       f_no_data_on_stop,
       f_string_too_small,
       f_string_too_large,
+      f_unterminated,
+      f_unterminated_on_eof,
+      f_unterminated_on_eol,
+      f_unterminated_on_eos,
+      f_unterminated_on_stop,
       f_unterminated_group,
       f_unterminated_group_on_eof,
       f_unterminated_group_on_eol,
index 68f9de833c5a7ac6860dbc76a71c7d5c159ae489..5aef3974cb3b23f359530bf226375d8d4c0877d1 100644 (file)
@@ -474,20 +474,20 @@ extern "C" {
         case f_string_too_large:
           *string = fl_status_string_string_too_large;
           break;
-        case f_unterminated_nest:
-          *string = fl_status_string_unterminated_nest;
+        case f_unterminated:
+          *string = fl_status_string_unterminated;
           break;
-        case f_unterminated_nest_on_eof:
-          *string = fl_status_string_unterminated_nest_on_eof;
+        case f_unterminated_on_eof:
+          *string = fl_status_string_unterminated_on_eof;
           break;
-        case f_unterminated_nest_on_eol:
-          *string = fl_status_string_unterminated_nest_on_eol;
+        case f_unterminated_on_eol:
+          *string = fl_status_string_unterminated_on_eol;
           break;
-        case f_unterminated_nest_on_eos:
-          *string = fl_status_string_unterminated_nest_on_eos;
+        case f_unterminated_on_eos:
+          *string = fl_status_string_unterminated_on_eos;
           break;
-        case f_unterminated_nest_on_stop:
-          *string = fl_status_string_unterminated_nest_on_stop;
+        case f_unterminated_on_stop:
+          *string = fl_status_string_unterminated_on_stop;
           break;
         case f_unterminated_group:
           *string = fl_status_string_unterminated_group;
@@ -504,6 +504,21 @@ extern "C" {
         case f_unterminated_group_on_stop:
           *string = fl_status_string_unterminated_group_on_stop;
           break;
+        case f_unterminated_nest:
+          *string = fl_status_string_unterminated_nest;
+          break;
+        case f_unterminated_nest_on_eof:
+          *string = fl_status_string_unterminated_nest_on_eof;
+          break;
+        case f_unterminated_nest_on_eol:
+          *string = fl_status_string_unterminated_nest_on_eol;
+          break;
+        case f_unterminated_nest_on_eos:
+          *string = fl_status_string_unterminated_nest_on_eos;
+          break;
+        case f_unterminated_nest_on_stop:
+          *string = fl_status_string_unterminated_nest_on_stop;
+          break;
         case f_incomplete_utf:
           *string = fl_status_string_incomplete_utf;
           break;
index ebe0813569fb67ea10d82ae0a3b4770fd10d3666..0772713305d8af198069b4ad19ac6cfd06d4befa 100644 (file)
@@ -477,20 +477,20 @@ extern "C" {
     #define fl_status_string_string_too_large "f_string_too_large"
     #define fl_status_string_string_too_large_length 19
 
-    #define fl_status_string_unterminated_nest "f_unterminated_nest"
-    #define fl_status_string_unterminated_nest_length 20
+    #define fl_status_string_unterminated "f_unterminated"
+    #define fl_status_string_unterminated_length 15
 
-    #define fl_status_string_unterminated_nest_on_eof "f_unterminated_nest_on_eof"
-    #define fl_status_string_unterminated_nest_on_eof_length 27
+    #define fl_status_string_unterminated_on_eof "f_unterminated_on_eof"
+    #define fl_status_string_unterminated_on_eof_length 22
 
-    #define fl_status_string_unterminated_nest_on_eol "f_unterminated_nest_on_eol"
-    #define fl_status_string_unterminated_nest_on_eol_length 27
+    #define fl_status_string_unterminated_on_eol "f_unterminated_on_eol"
+    #define fl_status_string_unterminated_on_eol_length 22
 
-    #define fl_status_string_unterminated_nest_on_eos "f_unterminated_nest_on_eos"
-    #define fl_status_string_unterminated_nest_on_eos_length 27
+    #define fl_status_string_unterminated_on_eos "f_unterminated_on_eos"
+    #define fl_status_string_unterminated_on_eos_length 22
 
-    #define fl_status_string_unterminated_nest_on_stop "f_unterminated_nest_on_stop"
-    #define fl_status_string_unterminated_nest_on_stop_length 28
+    #define fl_status_string_unterminated_on_stop "f_unterminated_on_stop"
+    #define fl_status_string_unterminated_on_stop_length 23
 
     #define fl_status_string_unterminated_group "f_unterminated_group"
     #define fl_status_string_unterminated_group_length 21
@@ -507,6 +507,21 @@ extern "C" {
     #define fl_status_string_unterminated_group_on_stop "f_unterminated_group_on_stop"
     #define fl_status_string_unterminated_group_on_stop_length 29
 
+    #define fl_status_string_unterminated_nest "f_unterminated_nest"
+    #define fl_status_string_unterminated_nest_length 20
+
+    #define fl_status_string_unterminated_nest_on_eof "f_unterminated_nest_on_eof"
+    #define fl_status_string_unterminated_nest_on_eof_length 27
+
+    #define fl_status_string_unterminated_nest_on_eol "f_unterminated_nest_on_eol"
+    #define fl_status_string_unterminated_nest_on_eol_length 27
+
+    #define fl_status_string_unterminated_nest_on_eos "f_unterminated_nest_on_eos"
+    #define fl_status_string_unterminated_nest_on_eos_length 27
+
+    #define fl_status_string_unterminated_nest_on_stop "f_unterminated_nest_on_stop"
+    #define fl_status_string_unterminated_nest_on_stop_length 28
+
     #define fl_status_string_incomplete_utf "f_incomplete_utf"
     #define fl_status_string_incomplete_utf_length 17
 
index 50246e26c17d3bcf9bb5cf2dc5e1769a157dd5e0..2a7b8e978c422b86c94043581f803d8cbe1399da 100644 (file)
@@ -776,28 +776,28 @@ extern "C" {
         return f_none;
       }
 
-      if (fl_string_compare(string, fl_status_string_unterminated_nest, length, fl_status_string_unterminated_nest_length) == f_equal_to) {
-        *code = f_unterminated_nest;
+      if (fl_string_compare(string, fl_status_string_unterminated, length, fl_status_string_unterminated_length) == f_equal_to) {
+        *code = f_unterminated;
         return f_none;
       }
 
-      if (fl_string_compare(string, fl_status_string_unterminated_nest_on_eof, length, fl_status_string_unterminated_nest_on_eof_length) == f_equal_to) {
-        *code = f_unterminated_nest_on_eof;
+      if (fl_string_compare(string, fl_status_string_unterminated_on_eof, length, fl_status_string_unterminated_on_eof_length) == f_equal_to) {
+        *code = f_unterminated_on_eof;
         return f_none;
       }
 
-      if (fl_string_compare(string, fl_status_string_unterminated_nest_on_eol, length, fl_status_string_unterminated_nest_on_eol_length) == f_equal_to) {
-        *code = f_unterminated_nest_on_eol;
+      if (fl_string_compare(string, fl_status_string_unterminated_on_eol, length, fl_status_string_unterminated_on_eol_length) == f_equal_to) {
+        *code = f_unterminated_on_eol;
         return f_none;
       }
 
-      if (fl_string_compare(string, fl_status_string_unterminated_nest_on_eos, length, fl_status_string_unterminated_nest_on_eos_length) == f_equal_to) {
-        *code = f_unterminated_nest_on_eos;
+      if (fl_string_compare(string, fl_status_string_unterminated_on_eos, length, fl_status_string_unterminated_on_eos_length) == f_equal_to) {
+        *code = f_unterminated_on_eos;
         return f_none;
       }
 
-      if (fl_string_compare(string, fl_status_string_unterminated_nest_on_stop, length, fl_status_string_unterminated_nest_on_stop_length) == f_equal_to) {
-        *code = f_unterminated_nest_on_stop;
+      if (fl_string_compare(string, fl_status_string_unterminated_on_stop, length, fl_status_string_unterminated_on_stop_length) == f_equal_to) {
+        *code = f_unterminated_on_stop;
         return f_none;
       }
 
@@ -826,6 +826,31 @@ extern "C" {
         return f_none;
       }
 
+      if (fl_string_compare(string, fl_status_string_unterminated_nest, length, fl_status_string_unterminated_nest_length) == f_equal_to) {
+        *code = f_unterminated_nest;
+        return f_none;
+      }
+
+      if (fl_string_compare(string, fl_status_string_unterminated_nest_on_eof, length, fl_status_string_unterminated_nest_on_eof_length) == f_equal_to) {
+        *code = f_unterminated_nest_on_eof;
+        return f_none;
+      }
+
+      if (fl_string_compare(string, fl_status_string_unterminated_nest_on_eol, length, fl_status_string_unterminated_nest_on_eol_length) == f_equal_to) {
+        *code = f_unterminated_nest_on_eol;
+        return f_none;
+      }
+
+      if (fl_string_compare(string, fl_status_string_unterminated_nest_on_eos, length, fl_status_string_unterminated_nest_on_eos_length) == f_equal_to) {
+        *code = f_unterminated_nest_on_eos;
+        return f_none;
+      }
+
+      if (fl_string_compare(string, fl_status_string_unterminated_nest_on_stop, length, fl_status_string_unterminated_nest_on_stop_length) == f_equal_to) {
+        *code = f_unterminated_nest_on_stop;
+        return f_none;
+      }
+
       if (fl_string_compare(string, fl_status_string_incomplete_utf, length, fl_status_string_incomplete_utf_length) == f_equal_to) {
         *code = f_incomplete_utf;
         return f_none;