commit 3ec662620b3476a496ccdb9b093532748ad2afb4
Author: Bertram Felgenhauer <int-e@gmx.de>
Date:   Wed Dec 10 16:08:26 2008 +0100

    Turn parse errors into assertions.

diff --git a/src/prolang.y b/src/prolang.y
index 54a74d3..edf9bfa 100644
--- a/src/prolang.y
+++ b/src/prolang.y
@@ -87,6 +87,7 @@
 #include <ctype.h>
 #include <stdio.h>
 #include <stdarg.h>
+#include <assert.h>
 
 #include "prolang.h"
 
@@ -8166,11 +8167,7 @@ case: L_CASE case_label ':'
          */
         case_list_entry_t *temp;
 
-        if ( !( current_break_address & CASE_LABELS_ENABLED ) )
-        {
-            yyerror("Case outside switch");
-            break;
-        }
+        assert(current_break_address & CASE_LABELS_ENABLED);
 
         /* Get and fill in a new case entry structure */
         if ( !(temp = new_case_entry()) )
@@ -8199,11 +8196,7 @@ case: L_CASE case_label ':'
         if ( !$2.numeric || !$4.numeric )
             yyerror("String case labels not allowed as range bounds");
 
-        if ( !( current_break_address & CASE_LABELS_ENABLED ) )
-        {
-            yyerror("Case range outside switch");
-            break;
-        }
+        assert(current_break_address & CASE_LABELS_ENABLED);
 
         /* A range like "case 4..2" is illegal,
          * a range like "case 4..4" counts as simple "case 4".
@@ -8283,10 +8276,7 @@ default:
            * for the current switch.
            */
 
-          if ( !( current_break_address & CASE_LABELS_ENABLED ) ) {
-              yyerror("Default outside switch");
-              break;
-          }
+          assert(current_break_address & CASE_LABELS_ENABLED);
 
           if (case_state.default_addr)
               yyerror("Duplicate default");
