Mercurial > hg > octave-lyh
diff src/parse.y @ 4234:90e44267e8cf
[project @ 2002-12-21 17:15:25 by jwe]
author | jwe |
---|---|
date | Sat, 21 Dec 2002 17:15:25 +0000 |
parents | ccfdb55c8156 |
children | a01ea6c855a3 |
line wrap: on
line diff
--- a/src/parse.y +++ b/src/parse.y @@ -705,16 +705,26 @@ { lexer_flags.looking_at_indirect_ref = true; } ; +begin_obj_idx : // empty + { lexer_flags.looking_at_object_index = true; } + ; + postfix_expr : primary_expr { $$ = $1; } - | postfix_expr '(' ')' + | postfix_expr '(' begin_obj_idx ')' { $$ = make_index_expression ($1, 0, '('); } - | postfix_expr '(' arg_list ')' - { $$ = make_index_expression ($1, $3, '('); } - | postfix_expr '{' '}' + | postfix_expr '(' begin_obj_idx arg_list ')' + { + $$ = make_index_expression ($1, $4, '('); + lexer_flags.looking_at_object_index = false; + } + | postfix_expr '{' begin_obj_idx '}' { $$ = make_index_expression ($1, 0, '{'); } - | postfix_expr '{' arg_list '}' - { $$ = make_index_expression ($1, $3, '{'); } + | postfix_expr '{' begin_obj_idx arg_list '}' + { + $$ = make_index_expression ($1, $4, '{'); + lexer_flags.looking_at_object_index = false; + } | postfix_expr PLUS_PLUS { $$ = make_postfix_op (PLUS_PLUS, $1, $2); } | postfix_expr MINUS_MINUS