Mercurial > hg > octave-lojdl
changeset 16252:6a3c6c921daa classdef
maint: periodic merge of default to classdef
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Mon, 11 Mar 2013 14:03:02 -0400 |
parents | 755b290530b3 (current diff) 37af399267b2 (diff) |
children | b8a2df776118 |
files | libinterp/parse-tree/oct-parse.in.yy |
diffstat | 1 files changed, 10 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/libinterp/parse-tree/oct-parse.in.yy +++ b/libinterp/parse-tree/oct-parse.in.yy @@ -258,8 +258,7 @@ // Nonterminals we construct. %type <comment_type> stash_comment function_beg %type <tok_type> classdef_beg -%type <sep_type> sep_no_nl opt_sep_no_nl nl opt_nl sep opt_sep -%type <sep_type> opt_comma opt_semi +%type <sep_type> sep_no_nl opt_sep_no_nl nl opt_nl sep opt_sep opt_comma %type <tree_type> input %type <tree_constant_type> string constant magic_colon %type <tree_anon_fcn_handle_type> anon_fcn_handle @@ -494,7 +493,9 @@ } ; -matrix_rows : matrix_rows1 opt_semi +matrix_rows : matrix_rows1 + { $$ = $1; } + | matrix_rows1 ';' // Ignore trailing semicolon. { $$ = $1; } ; @@ -515,7 +516,9 @@ { $$ = curr_parser.finish_cell ($2); } ; -cell_rows : cell_rows1 opt_semi +cell_rows : cell_rows1 + { $$ = $1; } + | cell_rows1 ';' // Ignore trailing semicolon. { $$ = $1; } ; @@ -529,7 +532,9 @@ ; cell_or_matrix_row - : arg_list opt_comma + : arg_list + { $$ = curr_parser.validate_matrix_row ($1); } + | arg_list ',' // Ignore trailing comma. { $$ = curr_parser.validate_matrix_row ($1); } ; @@ -1544,12 +1549,6 @@ { $$ = ','; } ; -opt_semi : // empty - { $$ = 0; } - | ';' - { $$ = ';'; } - ; - %% // Generic error messages.