# HG changeset patch # User jwe # Date 1107382129 0 # Node ID 7f4a3e4bc58a681f1066981765b6262ff592a9ce # Parent e3689205caa89dbbf497a88fcf6f2c442ae08c1a [project @ 2005-02-02 22:08:49 by jwe] diff --git a/src/ChangeLog b/src/ChangeLog --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2005-02-02 John W. Eaton + + * Makefile.in (parse.cc): Expect 12 shift/reduce conflicts. + * parse.y (loop_command): Allow "for (k=1:10) ... endfor". + 2005-01-27 David Bateman * ov-mapper.cc (octave_mapper::apply): Only work on real arguments diff --git a/src/Makefile.in b/src/Makefile.in --- a/src/Makefile.in +++ b/src/Makefile.in @@ -513,7 +513,7 @@ @$(top_srcdir)/move-if-change $@-t $@ parse.cc : parse.y - @echo "expect 11 shift/reduce conflicts" + @echo "expect 12 shift/reduce conflicts" $(YACC) $(YFLAGS) $< @$(top_srcdir)/move-if-change y.tab.c $(@F) diff --git a/src/parse.y b/src/parse.y --- a/src/parse.y +++ b/src/parse.y @@ -1068,6 +1068,11 @@ if (! ($$ = make_for_command ($1, $3, $5, $7, $8, $2))) ABORT_PARSE; } + | FOR stash_comment '(' assign_lhs '=' expression ')' opt_sep opt_list END + { + if (! ($$ = make_for_command ($1, $4, $6, $9, $10, $2))) + ABORT_PARSE; + } ; // =======