Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
3ad7102
toke.c: White space/comments only
khwilliamson Oct 8, 2025
248bf8c
S_parse_ident is not inline
khwilliamson Oct 11, 2025
c13ae23
toke.c: Simplify two ternaries
khwilliamson Oct 8, 2025
a3ce8ca
toke.c: Use flags parameter for S_force_word
khwilliamson Oct 8, 2025
a446c7c
toke.c: Document S_parse_ident
khwilliamson Oct 9, 2025
d057bb1
toke.c: Use flags parameter to S_parse_ident
khwilliamson Oct 8, 2025
b100148
toke.c: Change parse_ident to take any string
khwilliamson Oct 9, 2025
e1e09d4
parse_ident: Add const to two parameters
khwilliamson Oct 10, 2025
0b7f4ec
parse_ident: Use variable to avoid expression duplication
khwilliamson Oct 9, 2025
1e51d75
S_parse_ident: Terminate output with NUL
khwilliamson Oct 11, 2025
2c3e1f1
S_parse_ident: Restructure croaks
khwilliamson Oct 11, 2025
ede1f1d
parse_ident: Use constant when known.
khwilliamson Oct 11, 2025
8c37a89
S_parse_ident: Collapse two branches into one
khwilliamson Oct 11, 2025
7342473
S_parse_ident: Restructure loop
khwilliamson Oct 11, 2025
e73a74a
S_parse_ident: Add ability to parse only IDFIRST strings
khwilliamson Oct 11, 2025
8e28351
toke.c: Move some code into a called function
khwilliamson Oct 11, 2025
f1e7c09
toke.c: S_parse_ident: simplify
khwilliamson Oct 8, 2025
9082b27
S_scan_ident: Replace redundant code with function call
khwilliamson Oct 11, 2025
ab69f3e
S_parse_ident: Add flag to check for legality and not croak
khwilliamson Oct 11, 2025
bd66bfa
Add #define for the maximum Perl identifier length
khwilliamson Oct 11, 2025
36797cb
Add S_parse_ident_no_copy()
khwilliamson Oct 11, 2025
3c5916e
Perl_valid_identifier_pve: Use parse_ident
khwilliamson Oct 12, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions embed.fnc
Original file line number Diff line number Diff line change
Expand Up @@ -6142,8 +6142,7 @@ S |char * |force_version |NN char *s \
|int guessing
S |char * |force_word |NN char *start \
|int token \
|int check_keyword \
|int allow_pack
|U32 flags
RS |SV * |get_and_check_backslash_N_name_wrapper \
|SPTR const char *s \
|EPTRQ const char * const e
Expand All @@ -6169,12 +6168,17 @@ So |SV * |new_constant |NULLOK const char *s \
|NULLOK const char *type \
|STRLEN typelen \
|NULLOK const char **error_msg
S |void |parse_ident |NN char **s \
S |char * |parse_ident |SPTR const char *s \
|EPTRQ const char * const s_end \
|SPTR char **d \
|EPTRQ char * const e \
|int allow_package \
|EPTR char * const e \
|bool is_utf8 \
|U32 flags
S |char * |parse_ident_no_copy \
|SPTR const char *s \
|EPTR const char * const s_end \
|bool is_utf8 \
|bool check_dollar
|U32 flags
S |int |pending_ident
RS |char * |scan_const |NN char *start
RS |char * |scan_formline |NN char *s
Expand Down
3 changes: 2 additions & 1 deletion embed.h
Original file line number Diff line number Diff line change
Expand Up @@ -1680,14 +1680,15 @@
# define force_next(a) S_force_next(aTHX_ a)
# define force_strict_version(a) S_force_strict_version(aTHX_ a)
# define force_version(a,b) S_force_version(aTHX_ a,b)
# define force_word(a,b,c,d) S_force_word(aTHX_ a,b,c,d)
# define force_word(a,b,c) S_force_word(aTHX_ a,b,c)
# define get_and_check_backslash_N_name_wrapper(a,b) S_get_and_check_backslash_N_name_wrapper(aTHX_ a,b)
# define incline(a,b) S_incline(aTHX_ a,b)
# define intuit_method(a,b,c) S_intuit_method(aTHX_ a,b,c)
# define intuit_more(a,b) S_intuit_more(aTHX_ a,b)
# define lop(a,b,c,d) S_lop(aTHX_ a,b,c,d)
# define missingterm(a,b) S_missingterm(aTHX_ a,b)
# define parse_ident(a,b,c,d,e,f) S_parse_ident(aTHX_ a,b,c,d,e,f)
# define parse_ident_no_copy(a,b,c,d) S_parse_ident_no_copy(aTHX_ a,b,c,d)
# define pending_ident() S_pending_ident(aTHX)
# define scan_const(a) S_scan_const(aTHX_ a)
# define scan_formline(a) S_scan_formline(aTHX_ a)
Expand Down
3 changes: 2 additions & 1 deletion parser.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
*/

#define YYEMPTY (-2)
#define PERL_IDENTIFIER_LENGTH (256 * MAX_UNICODE_UTF8_BYTES)

typedef struct {
YYSTYPE val; /* semantic value */
Expand Down Expand Up @@ -112,7 +113,7 @@ typedef struct yy_parser {
U8 lex_fakeeof; /* precedence at which to fake EOF */
U8 lex_flags;
COP *saved_curcop; /* the previous PL_curcop */
char tokenbuf[ 256 * MAX_UNICODE_UTF8_BYTES ];
char tokenbuf[ PERL_IDENTIFIER_LENGTH ];
line_t herelines; /* number of lines in here-doc */
line_t preambling; /* line # when processing $ENV{PERL5DB} */

Expand Down
14 changes: 10 additions & 4 deletions proto.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading