Mercurial > octave-libgccjit
diff src/parse.y @ 5615:d01f07aeaec5
[project @ 2006-02-10 21:30:41 by jwe]
author | jwe |
---|---|
date | Fri, 10 Feb 2006 21:30:42 +0000 |
parents | bf96b0f9dbd7 |
children | 3236b4d98fde |
line wrap: on
line diff
--- a/src/parse.y Fri Feb 10 15:07:32 2006 +0000 +++ b/src/parse.y Fri Feb 10 21:30:42 2006 +0000 @@ -601,18 +601,19 @@ { $$ = $1; } ; -in_matrix_or_assign_lhs - : // empty - { lexer_flags.looking_at_matrix_or_assign_lhs = true; } - ; - matrix : '[' ']' - { $$ = new tree_constant (octave_value (Matrix ())); } + { + $$ = new tree_constant (octave_value (Matrix ())); + lexer_flags.looking_at_matrix_or_assign_lhs = false; + } | '[' ';' ']' - { $$ = new tree_constant (octave_value (Matrix ())); } - | '[' in_matrix_or_assign_lhs matrix_rows ']' { - $$ = finish_matrix ($3); + $$ = new tree_constant (octave_value (Matrix ())); + lexer_flags.looking_at_matrix_or_assign_lhs = false; + } + | '[' matrix_rows ']' + { + $$ = finish_matrix ($2); lexer_flags.looking_at_matrix_or_assign_lhs = false; } ; @@ -866,9 +867,9 @@ assign_lhs : simple_expr { $$ = new tree_argument_list ($1); } - | '[' in_matrix_or_assign_lhs arg_list CLOSE_BRACE + | '[' arg_list CLOSE_BRACE { - $$ = $3; + $$ = $2; lexer_flags.looking_at_matrix_or_assign_lhs = false; } ; @@ -1147,10 +1148,6 @@ { curr_sym_tab = tmp_local_sym_tab; } ; -in_return_list : // empty - { lexer_flags.looking_at_return_list = true; } - ; - // =========================== // List of function parameters // =========================== @@ -1223,7 +1220,7 @@ // List of function return value names // =================================== -return_list_beg : '[' in_return_list local_symtab +return_list_beg : '[' local_symtab ; return_list : return_list_beg return_list_end