-static struct do_if_trns *parse_do_if (void);
-static void add_ELSE_IF (struct do_if_trns *);
-static int goto_trns_proc (struct trns_header *, struct ccase *);
-static int do_if_trns_proc (struct trns_header *, struct ccase *);
-static void do_if_trns_free (struct trns_header *);
+/* A conditional clause. */
+struct clause
+ {
+ struct expression *condition; /* Test expression; NULL for ELSE clause. */
+ int target_index; /* Transformation to jump to if true. */
+ };
+
+/* DO IF transformation. */
+struct do_if_trns
+ {
+ struct clause *clauses; /* Clauses. */
+ size_t clause_cnt; /* Number of clauses. */
+ int past_END_IF_index; /* Transformation just past last clause. */
+ };
+
+static struct ctl_class do_if_class;
+
+static int parse_clause (struct do_if_trns *);
+static void add_clause (struct do_if_trns *,
+ struct expression *condition, int target_index);
+static void add_else (struct do_if_trns *);
+
+static bool has_else (struct do_if_trns *);
+static bool must_not_have_else (struct do_if_trns *);
+static void close_do_if (void *do_if);
+
+static trns_proc_func do_if_trns_proc, break_trns_proc;
+static trns_free_func do_if_trns_free;