-#include "debug-print.h"
-
-/* *INDENT-OFF* */
-/* LOOP strategy:
-
- Each loop causes 3 different transformations to be output. The
- first two are output when the LOOP command is encountered; the last
- is output when the END LOOP command is encountered.
-
- The first to be output resets the pass number in the second
- transformation to -1. This ensures that the pass number is set to
- -1 every time the loop is encountered, before the first iteration.
-
- The second transformation increments the pass number. If there is
- no indexing or test clause on either LOOP or END LOOP, then the
- pass number is checked against MXLOOPS and control may pass out of
- the loop; otherwise the indexing or test clause(s) on LOOP are
- checked, and again control may pass out of the loop.
-
- After the second transformation the body of the loop is executed.
-
- The last transformation checks the test clause if present and
- either jumps back up to the second transformation or terminates the
- loop.
-
- Flow of control: (The characters ^V<> represents arrows.)
-
- 1. LOOP (sets pass # to -1)
- V
- V
- >>2. LOOP (increment pass number)
- ^ (test optional indexing clause)
- ^ (test optional IF clause)
- ^ if we need another trip if we're done with the loop>>V
- ^ V V
- ^ V V
- ^ *. execute loop body V
- ^ . V
- ^ . (any number of transformations) V
- ^ . V
- ^ V
- ^ 3. END LOOP (test optional IF clause) V
- ^<<<<if we need another trip if we're done with the loop>>V
- V
- V
- *. transformations after loop body<<<<<<<<<<<<<<<<<<<<<<<<<<<
-
- */
-/* *INDENT-ON* */
-
-/* Types of limits on loop execution. */
-enum
- {
- LPC_INDEX = 001, /* Limited by indexing clause. */
- LPC_COND = 002, /* Limited by IF clause. */
- LPC_RINDEX = 004 /* Indexing clause counts downward, at least
- for this pass thru the loop. */
- };
-
-/* LOOP transformation 1. */
-struct loop_1_trns
- {
- struct trns_header h;
-
- struct loop_2_trns *two; /* Allows modification of associated
- second transformation. */
-
- struct expression *init; /* Starting index. */
- struct expression *incr; /* Index increment. */
- struct expression *term; /* Terminal index. */
- };
-
-/* LOOP transformation 2. */
-struct loop_2_trns
+#include "gettext.h"
+#define _(msgid) gettext (msgid)
+
+/* LOOP outputs a transformation that is executed only on the
+ first pass through the loop. On this trip, it initializes for
+ the first pass by resetting the pass number, setting up the
+ indexing clause, and testing the LOOP IF clause. If the loop
+ is not to be entered at all, it jumps forward just past the
+ END LOOP transformation; otherwise, it continues to the
+ transformation following LOOP.
+
+ END LOOP outputs a transformation that executes at the end of
+ each trip through the loop. It checks the END LOOP IF clause,
+ then updates the pass number, increments the indexing clause,
+ and tests the LOOP IF clause. If another pass through the
+ loop is due, it jumps backward to just after the LOOP
+ transformation; otherwise, it continues to the transformation
+ following END LOOP. */
+
+struct loop_trns