From 3cdf23bcd2851ba8683e6782856398b98e4aded5 Mon Sep 17 00:00:00 2001 From: Jacob Lifshay Date: Wed, 3 May 2023 21:25:42 -0700 Subject: [PATCH] support calling functions with no args in pseudocode --- src/openpower/decoder/pseudo/parser.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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" -- 2.30.2