Q:

Parse func f(arg1, arg2: type) in lex yacc compiler

I successfully parse:
func f(a: int) return int{}

And
func f(a: int; b: string) return int{}

But I fail to parse
func f(a, c: int; b: string) return int{}

My compiler fails to catch whatever comes behind the comma and I cant figure out how to fix it. 
What I get in the third case is c as an int, b as a string and null as an a (as opposed to a as an int). 
The rules I use-
function:
FUNC iden_name O_PAREN parameters C_PAREN RETURN ident_type block { 
    Node * left = makeTripNode("FUNCTION", $7, $2, $4 );
    Node * right = $8;
    $$ = makePairNode("FUNCTION", left, right ); 
}
parameters:
parameters SEMICOLON parameter { $$ = makePairNode("PARAMETERS", $1, $3); }
    | parameters COMMA parameter { $$ = makePairNode("PARAMETERS", $1, $3); }
    | parameter {$$ = $1;}
    ;
parameter:
iden_name COLON ident_type { $$ = makePairNode("PARAM", $3, $1); }
    | iden_name {$$ = $1;}
    ;

A:

The rule
parameters:
parameters SEMICOLON parameter { $$ = makePairNode("PARAMETERS", $1, $3); }
    | parameters COMMA parameter { $$ = makePairNode("PARAMETERS", $1, $3); }
    | parameter {$$ = $1;}
    ;

defines that parameters is a sequence of something called parameter, separated by either a semicolon or a comma.  Right away it doesn't look like what you are after, since it will accept a: int, b: string. 
Meanwhile, according to the next rule it is OK to have a parameter consisting go just an ident_name.  This is exactly how a, is treated: a typeless a separated from the rest by a comma. 
If I understand your intentions correctly, consider something along the lines of
parameters
    : parameters SEMICOLON typed_parameter group
    | typed_parameter_group
    ;

typed_parameter_group
    : parameter_list COLON ident_type
    | parameter_list
    ;

parameter_list
    : parameter_list COMMA iden_name
    | iden_name
    ;

