Commit 8e7f3cfd78 for perl
commit 8e7f3cfd78fd10fa761e09cd7aa88af4f47179dc
Author: Branislav Zahradník <barney@cpan.org>
Date: Sun Sep 27 10:47:17 2026 +0200
[perly] method invocation -> Unify logical name for invoked method
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 898f860ab0..9f558aa294 100644
--- a/perly.act
+++ b/perly.act
@@ -2360,6 +2360,6 @@ case 2: /* @1: %empty */
/* Generated from:
- * 7611b33d05b2582b1799ab73cef409f26772b51d19b6ad648d8e0c8899544f5b perly.y
+ * 561b9e04cb9937ab751c2cb51c0d6cefd86bf87239676cd9902c54299de0e300 perly.y
* ba173fe7f0e9b6b5465fb5d0705af3290ac7d8b511f0eead585307eb6c68918d regen_perly.pl
* ex: set ro ft=c: */
diff --git a/perly.h b/perly.h
index cca33c740f..4f8e62ddb7 100644
--- a/perly.h
+++ b/perly.h
@@ -248,6 +248,6 @@ int yyparse (void);
/* Generated from:
- * 7611b33d05b2582b1799ab73cef409f26772b51d19b6ad648d8e0c8899544f5b perly.y
+ * 561b9e04cb9937ab751c2cb51c0d6cefd86bf87239676cd9902c54299de0e300 perly.y
* ba173fe7f0e9b6b5465fb5d0705af3290ac7d8b511f0eead585307eb6c68918d regen_perly.pl
* ex: set ro ft=c: */
diff --git a/perly.tab b/perly.tab
index 6c8ad3f1f4..5742e55365 100644
--- a/perly.tab
+++ b/perly.tab
@@ -1667,6 +1667,6 @@ static const toketypes yy_type_tab[] =
};
/* Generated from:
- * 7611b33d05b2582b1799ab73cef409f26772b51d19b6ad648d8e0c8899544f5b perly.y
+ * 561b9e04cb9937ab751c2cb51c0d6cefd86bf87239676cd9902c54299de0e300 perly.y
* ba173fe7f0e9b6b5465fb5d0705af3290ac7d8b511f0eead585307eb6c68918d regen_perly.pl
* ex: set ro ft=c: */
diff --git a/perly.y b/perly.y
index 922b9f6f09..160b51fdc8 100644
--- a/perly.y
+++ b/perly.y
@@ -1341,7 +1341,7 @@ listop : LSTOP indirob listexpr /* map {...} @args or print $fh @args */
| /* $foo->bar(list) */
term [target]
ARROW
- methodname
+ methodname [method]
PERLY_PAREN_OPEN
optexpr
PERLY_PAREN_CLOSE
@@ -1352,14 +1352,14 @@ listop : LSTOP indirob listexpr /* map {...} @args or print $fh @args */
op_append_elem (
OP_LIST,
op_prepend_elem (OP_LIST, scalar ($target), $optexpr),
- newMETHOP (OP_METHOD, 0, $methodname)
+ newMETHOP (OP_METHOD, 0, $method)
)
);
}
| /* $foo->bar */
term [target]
ARROW
- methodname
+ methodname [method]
{
$$ = op_convert_list (
OP_ENTERSUB,
@@ -1367,7 +1367,7 @@ listop : LSTOP indirob listexpr /* map {...} @args or print $fh @args */
op_append_elem (
OP_LIST,
scalar ($target),
- newMETHOP (OP_METHOD, 0, $methodname)
+ newMETHOP (OP_METHOD, 0, $method)
)
);
}
@@ -1407,7 +1407,7 @@ listop : LSTOP indirob listexpr /* map {...} @args or print $fh @args */
);
}
| /* new Class @args */
- METHCALL0
+ METHCALL0 [method]
indirob [target]
optlistexpr
{
@@ -1417,12 +1417,12 @@ listop : LSTOP indirob listexpr /* map {...} @args or print $fh @args */
op_append_elem (
OP_LIST,
op_prepend_elem (OP_LIST, $target, $optlistexpr),
- newMETHOP (OP_METHOD, 0, $METHCALL0)
+ newMETHOP (OP_METHOD, 0, $method)
)
);
}
| /* method $object (@args) */
- METHCALL
+ METHCALL [method]
indirob [target]
PERLY_PAREN_OPEN
optexpr
@@ -1433,7 +1433,7 @@ listop : LSTOP indirob listexpr /* map {...} @args or print $fh @args */
op_append_elem (
OP_LIST,
op_prepend_elem (OP_LIST, $target, $optexpr),
- newMETHOP(OP_METHOD, 0, $METHCALL)
+ newMETHOP(OP_METHOD, 0, $method)
)
);
}