@@ -424,7 +424,7 @@ argument :
424424
425425element_modification : << bool is_final = false; >>
426426 { FINAL << is_final = true; >> }
427- cr :component_reference /* name_path /* Not in spec */
427+ cr :single_component_reference /* name_path /* Not in spec */
428428 sp :modification
429429 <<
430430 Attrib a = $ [MODIFICATION ,"---" ];
@@ -517,7 +517,7 @@ equation : << bool is_assign = false; AST *top; >>
517517 ;
518518
519519algorithm :
520- ( cr :component_reference
520+ ( cr :single_component_reference
521521 ( ASSIGN ^ e :expression
522522 << #0 ->rml = Absyn__ALG_5fASSIGN(#cr->rml, #e->rml); >>
523523 | function_call << unimpl ("algorithm function_call" ); >> )
@@ -752,14 +752,16 @@ primary : << bool is_matrix; >>
752752 | f :FALS /*E*/ << #f ->rml = Absyn__BOOL(RML_FALSE); >>
753753 | t :TRU /*E*/ << #t ->rml = Absyn__BOOL(RML_TRUE); >>
754754/* | (name_path_function_arguments)? */
755- | i :component_reference
755+ /* | i:single_component_reference
756756 { fc:function_call }
757757 << if(#fc)
758758 #0->rml = Absyn__CALL(#i->rml,#fc->rml);
759759 else
760760 #0->rml = Absyn__CREF(#i->rml);
761761 >>
762- | s :STRING << #s ->rml = Absyn__STRING(mk_scon($s.u.stringval)); >>
762+ */
763+ | component_references
764+ | s :STRING << #s ->rml = Absyn__STRING(mk_scon($s.u.stringval)); >>
763765 | par :LPAR ^
764766 e :expression RPAR !
765767 << #par ->rml = #e->rml; >>
@@ -776,6 +778,15 @@ primary : << bool is_matrix; >>
776778 RBRACK !
777779 ;
778780
781+ component_references :
782+ single_component_reference { function_or_multiple_references }
783+ ;
784+
785+ function_or_multiple_references :
786+ function_call
787+ | "," single_component_reference { "," single_component_reference }
788+ ;
789+
779790/* name_path_function_arguments ! : << Attrib a = $[FUNCALL,"---"]; >> */
780791/* n:name_path f:function_arguments */
781792/* << */
@@ -802,10 +813,10 @@ name_path : << bool qualified = false; >>
802813/* name_path b:LBRACK^ subscript_list RBRACK! */
803814/* ; */
804815
805- component_reference : << void * tail = NULL ;>>
816+ single_component_reference : << void * tail = NULL ;>>
806817 i :IDENT ^ { a :array_subscripts }
807818 << #i ->rml = mk_scon($i.u.stringval); >>
808- { dot :DOT ^ c :component_reference << tail = #c -> rml ; >> }
819+ { dot :DOT ^ c :single_component_reference << tail = #c -> rml ; >> }
809820 << if (tail )
810821 #0 ->rml = Absyn__CREF_5fQUAL(#i->rml, #a?#a->rml:mk_nil(), tail);
811822 else
0 commit comments