Branch: refs/heads/blead
Home: https://github.com/Perl/perl5
Commit: f49cfe1d0fe6463e3793702d93b4384ab23401e4
https://github.com/Perl/perl5/commit/f49cfe1d0fe6463e3793702d93b4384ab23401e4
Author: David Mitchell <[email protected]>
Date: 2025-11-06 (Thu, 06 Nov 2025)
Changed paths:
M perly.c
Log Message:
-----------
parser debugging output: strip token name prefixes
Some of the names of parser (perly.y) tokens have a common prefix, such
as
PERLY_SEMICOLON
PERLY_AMPERSAND
KW_PACKAGE
KW_CLASS
Perl's -Dpv switch produces debugging output that also displays the top
few items on the parse stack. The token names are truncated for
compactness' sake. This currently leads to a display where its mostly
just the token name's prefix that is displayed, e.g.
$ perl -Dpv -e'package Foo'
...
index: 1 2 3 4 5 6 7 8
state: 1 9 17 149 91 263 412 503
token: GRAMPROG @1 remember stmtseq KW_PACKA BAREWORD BAREWORD PERLY_SE
value: 0 0 63 (Nullop) 0 (Nullop) const 735909768
After this commit, PERLY_, KW_ etc prefixes are stripped, allowing more
of the actual token name is displayed:
index: 1 2 3 4 5 6 7 8
state: 1 9 17 149 91 263 412 503
token: GRAMPROG @1 remember stmtseq PACKAGE BAREWORD BAREWORD SEMICOLO
value: 0 0 63 (Nullop) 0 (Nullop) const 227539304
To unsubscribe from these emails, change your notification settings at
https://github.com/Perl/perl5/settings/notifications