From: Ben Pfaff Date: Sun, 10 Dec 2006 04:12:40 +0000 (+0000) Subject: * repeat.c (parse_lines): Issue an error when attempting to nest X-Git-Tag: v0.6.0~652 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d97e6b19cfddfc6fa7cd6df7112b0d2a311d8ede;p=pspp-builds.git * repeat.c (parse_lines): Issue an error when attempting to nest DO REPEAT in compatibility mode. --- diff --git a/src/language/control/ChangeLog b/src/language/control/ChangeLog index ef5f63a4..2e38bb6f 100644 --- a/src/language/control/ChangeLog +++ b/src/language/control/ChangeLog @@ -1,3 +1,8 @@ +Sat Dec 9 20:12:34 2006 Ben Pfaff + + * repeat.c (parse_lines): Issue an error when attempting to nest + DO REPEAT in compatibility mode. + Sat Dec 2 17:01:59 2006 Ben Pfaff Significant cleanup to DO REPEAT. diff --git a/src/language/control/repeat.c b/src/language/control/repeat.c index 286cc347..5a1ad08d 100644 --- a/src/language/control/repeat.c +++ b/src/language/control/repeat.c @@ -328,8 +328,13 @@ parse_lines (struct lexer *lexer, struct repeat_block *block) lex_preprocess_line (&text, syntax, &command_ends_before_line, &command_ends_after_line); - if (recognize_do_repeat (ds_ss (&text))) - nesting_level++; + if (recognize_do_repeat (ds_ss (&text))) + { + if (get_syntax () == COMPATIBLE) + msg (SE, _("DO REPEAT may not nest in compatibility mode.")); + else + nesting_level++; + } else if (recognize_end_repeat (ds_ss (&text), &block->print) && nesting_level-- == 0) {