def p_constdefs(p):
    """constdefs :
                 | constdefs constdef
                 | constdef"""
    if len(p) == 3:
        p[1].update(p[2])
    p[0] = p[1] if len(p) > 1 else {}
dataset/ETHPy150Open EricssonResearch/calvin-base/calvin/csparser/parser.py/p_constdefs/original