From: Jacob Lifshay Date: Thu, 4 May 2023 04:25:42 +0000 (-0700) Subject: support calling functions with no args in pseudocode X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=91fa0ea0319e19d4f75cdb4ba54fa2fccd75909a;p=openpower-isa.git support calling functions with no args in pseudocode --- diff --git a/src/openpower/decoder/pseudo/parser.py b/src/openpower/decoder/pseudo/parser.py index d8c0399e..de3eda73 100644 --- a/src/openpower/decoder/pseudo/parser.py +++ b/src/openpower/decoder/pseudo/parser.py @@ -786,8 +786,11 @@ class PowerParser: p[0] = p[1] def p_trailer_arglist(self, p): - "trailer_arglist : LPAR arglist RPAR" - p[0] = ("CALL", p[2]) + """trailer_arglist : LPAR arglist RPAR + | LPAR RPAR + """ + args = [] if len(p) == 3 else p[2] + p[0] = ("CALL", args) def p_trailer_subscript(self, p): "trailer_subscript : LBRACK subscript RBRACK"