Commit 651f6a677e for perl
commit 651f6a677ee48caa93403dfc242628745f99d9e6
Author: Branislav Zahradník <barney@cpan.org>
Date: Sun Sep 27 10:42:03 2026 +0200
[perly] method invocation -> Unify logical name for target
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 74d1b92595..898f860ab0 100644
--- a/perly.act
+++ b/perly.act
@@ -2360,6 +2360,6 @@ case 2: /* @1: %empty */
/* Generated from:
- * 089073f17c951ddaa21f8117eb0453c283d9e787b7b8d5355d00e03ea1973de1 perly.y
+ * 7611b33d05b2582b1799ab73cef409f26772b51d19b6ad648d8e0c8899544f5b perly.y
* ba173fe7f0e9b6b5465fb5d0705af3290ac7d8b511f0eead585307eb6c68918d regen_perly.pl
* ex: set ro ft=c: */
diff --git a/perly.h b/perly.h
index 5bb85ac16e..cca33c740f 100644
--- a/perly.h
+++ b/perly.h
@@ -248,6 +248,6 @@ int yyparse (void);
/* Generated from:
- * 089073f17c951ddaa21f8117eb0453c283d9e787b7b8d5355d00e03ea1973de1 perly.y
+ * 7611b33d05b2582b1799ab73cef409f26772b51d19b6ad648d8e0c8899544f5b perly.y
* ba173fe7f0e9b6b5465fb5d0705af3290ac7d8b511f0eead585307eb6c68918d regen_perly.pl
* ex: set ro ft=c: */
diff --git a/perly.tab b/perly.tab
index 7fe5fb0c03..6c8ad3f1f4 100644
--- a/perly.tab
+++ b/perly.tab
@@ -1667,6 +1667,6 @@ static const toketypes yy_type_tab[] =
};
/* Generated from:
- * 089073f17c951ddaa21f8117eb0453c283d9e787b7b8d5355d00e03ea1973de1 perly.y
+ * 7611b33d05b2582b1799ab73cef409f26772b51d19b6ad648d8e0c8899544f5b perly.y
* ba173fe7f0e9b6b5465fb5d0705af3290ac7d8b511f0eead585307eb6c68918d regen_perly.pl
* ex: set ro ft=c: */
diff --git a/perly.y b/perly.y
index 8223c4a53c..922b9f6f09 100644
--- a/perly.y
+++ b/perly.y
@@ -1339,7 +1339,7 @@ listop : LSTOP indirob listexpr /* map {...} @args or print $fh @args */
op_prepend_elem(OP_LIST, newGVREF($FUNC,$indirob), $expr) );
}
| /* $foo->bar(list) */
- term
+ term [target]
ARROW
methodname
PERLY_PAREN_OPEN
@@ -1351,13 +1351,13 @@ listop : LSTOP indirob listexpr /* map {...} @args or print $fh @args */
OPf_STACKED,
op_append_elem (
OP_LIST,
- op_prepend_elem (OP_LIST, scalar ($term), $optexpr),
+ op_prepend_elem (OP_LIST, scalar ($target), $optexpr),
newMETHOP (OP_METHOD, 0, $methodname)
)
);
}
| /* $foo->bar */
- term
+ term [target]
ARROW
methodname
{
@@ -1366,13 +1366,13 @@ listop : LSTOP indirob listexpr /* map {...} @args or print $fh @args */
OPf_STACKED,
op_append_elem (
OP_LIST,
- scalar ($term),
+ scalar ($target),
newMETHOP (OP_METHOD, 0, $methodname)
)
);
}
| /* $foo->&bar(list) */
- term
+ term [target]
ARROW
PERLY_AMPERSAND
subname [method]
@@ -1385,13 +1385,13 @@ listop : LSTOP indirob listexpr /* map {...} @args or print $fh @args */
OPf_STACKED,
op_append_elem (
OP_LIST,
- op_prepend_elem (OP_LIST, scalar ($term), $optexpr),
+ op_prepend_elem (OP_LIST, scalar ($target), $optexpr),
newCVREF (0, $method)
)
);
}
| /* $foo->&bar */
- term
+ term [target]
ARROW
PERLY_AMPERSAND
subname [method]
@@ -1401,14 +1401,14 @@ listop : LSTOP indirob listexpr /* map {...} @args or print $fh @args */
OPf_STACKED,
op_append_elem (
OP_LIST,
- scalar ($term),
+ scalar ($target),
newCVREF (0, $method)
)
);
}
| /* new Class @args */
METHCALL0
- indirob
+ indirob [target]
optlistexpr
{
$$ = op_convert_list (
@@ -1416,14 +1416,14 @@ listop : LSTOP indirob listexpr /* map {...} @args or print $fh @args */
OPf_STACKED,
op_append_elem (
OP_LIST,
- op_prepend_elem (OP_LIST, $indirob, $optlistexpr),
+ op_prepend_elem (OP_LIST, $target, $optlistexpr),
newMETHOP (OP_METHOD, 0, $METHCALL0)
)
);
}
| /* method $object (@args) */
METHCALL
- indirob
+ indirob [target]
PERLY_PAREN_OPEN
optexpr
PERLY_PAREN_CLOSE
@@ -1432,7 +1432,7 @@ listop : LSTOP indirob listexpr /* map {...} @args or print $fh @args */
OP_ENTERSUB, OPf_STACKED,
op_append_elem (
OP_LIST,
- op_prepend_elem (OP_LIST, $indirob, $optexpr),
+ op_prepend_elem (OP_LIST, $target, $optexpr),
newMETHOP(OP_METHOD, 0, $METHCALL)
)
);