Commit f5dfb3151d for perl
commit f5dfb3151d7627d373d5eec4667739b2d66d5374
Author: Branislav Zahradník <barney@cpan.org>
Date: Sun Sep 27 13:14:22 2026 +0200
[perly] method invocation -> Unify logical name for arguments
Affected syntax:
```
target -> method
target -> method (arguments)
method target
method target (arguments)
```
Motivation:
- Makes semantic actions across multiple grammar alternatives directly
comparable and easier to align.
- Simplifies `bison` parser actions by providing a consistent variable
reference regardless of the specific production branch matched.
diff --git a/perly.act b/perly.act
index 9f558aa294..45b15abc93 100644
--- a/perly.act
+++ b/perly.act
@@ -2360,6 +2360,6 @@ case 2: /* @1: %empty */
/* Generated from:
- * 561b9e04cb9937ab751c2cb51c0d6cefd86bf87239676cd9902c54299de0e300 perly.y
+ * 649c3163c4f5dbe83dfd3e8ec4616b10c6f200e6dd5e22e406f35c89ca6015b2 perly.y
* ba173fe7f0e9b6b5465fb5d0705af3290ac7d8b511f0eead585307eb6c68918d regen_perly.pl
* ex: set ro ft=c: */
diff --git a/perly.h b/perly.h
index 4f8e62ddb7..1d904cd58a 100644
--- a/perly.h
+++ b/perly.h
@@ -248,6 +248,6 @@ int yyparse (void);
/* Generated from:
- * 561b9e04cb9937ab751c2cb51c0d6cefd86bf87239676cd9902c54299de0e300 perly.y
+ * 649c3163c4f5dbe83dfd3e8ec4616b10c6f200e6dd5e22e406f35c89ca6015b2 perly.y
* ba173fe7f0e9b6b5465fb5d0705af3290ac7d8b511f0eead585307eb6c68918d regen_perly.pl
* ex: set ro ft=c: */
diff --git a/perly.tab b/perly.tab
index 5742e55365..2066e1df51 100644
--- a/perly.tab
+++ b/perly.tab
@@ -1667,6 +1667,6 @@ static const toketypes yy_type_tab[] =
};
/* Generated from:
- * 561b9e04cb9937ab751c2cb51c0d6cefd86bf87239676cd9902c54299de0e300 perly.y
+ * 649c3163c4f5dbe83dfd3e8ec4616b10c6f200e6dd5e22e406f35c89ca6015b2 perly.y
* ba173fe7f0e9b6b5465fb5d0705af3290ac7d8b511f0eead585307eb6c68918d regen_perly.pl
* ex: set ro ft=c: */
diff --git a/perly.y b/perly.y
index 160b51fdc8..ebf43c0859 100644
--- a/perly.y
+++ b/perly.y
@@ -1343,7 +1343,7 @@ listop : LSTOP indirob listexpr /* map {...} @args or print $fh @args */
ARROW
methodname [method]
PERLY_PAREN_OPEN
- optexpr
+ optexpr [arguments]
PERLY_PAREN_CLOSE
{
$$ = op_convert_list (
@@ -1351,7 +1351,7 @@ listop : LSTOP indirob listexpr /* map {...} @args or print $fh @args */
OPf_STACKED,
op_append_elem (
OP_LIST,
- op_prepend_elem (OP_LIST, scalar ($target), $optexpr),
+ op_prepend_elem (OP_LIST, scalar ($target), $arguments),
newMETHOP (OP_METHOD, 0, $method)
)
);
@@ -1377,7 +1377,7 @@ listop : LSTOP indirob listexpr /* map {...} @args or print $fh @args */
PERLY_AMPERSAND
subname [method]
PERLY_PAREN_OPEN
- optexpr
+ optexpr [arguments]
PERLY_PAREN_CLOSE
{
$$ = op_convert_list (
@@ -1385,7 +1385,7 @@ listop : LSTOP indirob listexpr /* map {...} @args or print $fh @args */
OPf_STACKED,
op_append_elem (
OP_LIST,
- op_prepend_elem (OP_LIST, scalar ($target), $optexpr),
+ op_prepend_elem (OP_LIST, scalar ($target), $arguments),
newCVREF (0, $method)
)
);
@@ -1409,14 +1409,14 @@ listop : LSTOP indirob listexpr /* map {...} @args or print $fh @args */
| /* new Class @args */
METHCALL0 [method]
indirob [target]
- optlistexpr
+ optlistexpr [arguments]
{
$$ = op_convert_list (
OP_ENTERSUB,
OPf_STACKED,
op_append_elem (
OP_LIST,
- op_prepend_elem (OP_LIST, $target, $optlistexpr),
+ op_prepend_elem (OP_LIST, $target, $arguments),
newMETHOP (OP_METHOD, 0, $method)
)
);
@@ -1425,14 +1425,14 @@ listop : LSTOP indirob listexpr /* map {...} @args or print $fh @args */
METHCALL [method]
indirob [target]
PERLY_PAREN_OPEN
- optexpr
+ optexpr [arguments]
PERLY_PAREN_CLOSE
{
$$ = op_convert_list (
OP_ENTERSUB, OPf_STACKED,
op_append_elem (
OP_LIST,
- op_prepend_elem (OP_LIST, $target, $optexpr),
+ op_prepend_elem (OP_LIST, $target, $arguments),
newMETHOP(OP_METHOD, 0, $method)
)
);