summaryrefslogtreecommitdiff
path: root/toke.c
Commit message (Collapse)AuthorAgeFilesLines
* toke.c: Save a '&' instr by casting to U8Karl Williamson2021-07-301-1/+1
|
* Base *.[ch] files: Replace leading tabs with blanksMichael G Schwern2021-05-311-2998/+2998
| | | | | | | This is a rebasing by @khw of part of GH #18792, which I needed to get in now to proceed with other commits. It also strips trailing white space from the affected files.
* toke.c: fix format warningsAlyssa Ross2021-05-211-3/+3
| | | | | | | | | | Signed-off-by: James E Keenan <jkeenan@cpan.org> Remove 2nd const from patch originally submitted in https://github.com/Perl/perl5/pull/18726; it was causing two build-time warnings. Alyssa Ross is now a Perl author.
* Initial attempt at feature 'try'Paul "LeoNerd" Evans2021-02-041-0/+12
| | | | | | | | | * Add feature, experimental warning, keyword * Basic parsing * Basic implementation as optree fragment See also https://github.com/Perl/perl5/issues/18504
* Allow blanks within and adjacent to {...} constructsKarl Williamson2021-01-201-7/+24
| | | | | This was the consensus in http://nntp.perl.org/group/perl.perl5.porters/258489
* toke.c: White-space, comment onlyKarl Williamson2021-01-201-3/+3
|
* toke.c: Change variable nameKarl Williamson2021-01-201-17/+17
| | | | | A future commit will need it to represent just the meaning of the new name
* toke.c: Slight simplificationKarl Williamson2021-01-201-6/+6
| | | | | | | Rather than know how far we have advanced in parsing when we have to back up, save the checkpoint position and simply backtrack to it. This results in slightly more maintainable code that a future commit will take advantage of.
* Revamp regcurly(), regpiece() use of itKarl Williamson2021-01-201-2/+2
| | | | | | | | | | | | | | | | | | | | This commit copies portions of new_regcurly(), which has been around since 5.28, into plain regcurly(), as a baby step in preparation for converting entirely to the new one. These functions are used for parsing {m,n} quantifiers. Future commits will add capabilities not available using the old version. The commit adds an optional parameter, to return to the caller information it gleans during parsing. regpiece() is changed by this commit to use this information, instead of itself reparsing the input. Part of the reason for this commit is that changes are planned soon to what is legal syntax. With this commit in place, those changes only have to be done once. This commit also extracts into a function the calculation of the quantifier bounds. This allows the logic for that to be done in one place instead of two.
* Define RSFP_FILENO before using itdlaugt2021-01-051-7/+6
|
* add a bareword_filehandles feature, which is enabled by defaultTony Cook2021-01-041-0/+10
| | | | This disables use of bareword filehandles except for the built-in handles
* Cleanup remnants of 'KEY_err' removalBranislav Zahradník2020-12-271-1/+0
| | | | f23102e2d6 removed DOROP token (KEY_err) but related grammar remained
* Distinguish C- and perly- literals - PERLY_DOLLARBranislav Zahradník2020-12-271-8/+10
|
* Distinguish C- and perly- literals - PERLY_SLASHBranislav Zahradník2020-12-271-1/+2
|
* Distinguish C- and perly- literals - PERLY_STARBranislav Zahradník2020-12-271-5/+7
|
* Distinguish C- and perly- literals - PERLY_PAREN_CLOSEBranislav Zahradník2020-12-271-5/+6
|
* Distinguish C- and perly- literals - PERLY_PAREN_OPENBranislav Zahradník2020-12-271-4/+5
|
* Distinguish C- and perly- literals - PERLY_PERCENT_SIGNBranislav Zahradník2020-12-271-4/+7
|
* Distinguish C- and perly- literals - PERLY_SNAILBranislav Zahradník2020-12-271-8/+14
|
* Distinguish C- and perly- literals - PERLY_PLUSBranislav Zahradník2020-12-271-1/+2
|
* Distinguish C- and perly- literals - PERLY_MINUSBranislav Zahradník2020-12-271-3/+4
|
* Distinguish C- and perly- literals - PERLY_QUESTION_MARKBranislav Zahradník2020-12-271-1/+2
|
* Distinguish C- and perly- literals - PERLY_COLONBranislav Zahradník2020-12-271-2/+3
|
* Distinguish C- and perly- literals - PERLY_TILDEBranislav Zahradník2020-12-271-1/+2
|
* Distinguish C- and perly- literals - PERLY_EXCLAMATION_MARKBranislav Zahradník2020-12-271-2/+3
|
* Distinguish C- and perly- literals - PERLY_COMMABranislav Zahradník2020-12-271-8/+12
|
* Distinguish C- and perly- literals - PERLY_AMPERSANDBranislav Zahradník2020-12-271-5/+6
|
* Distinguish C- and perly- literals - PERLY_EQUAL_SIGNBranislav Zahradník2020-12-271-1/+2
|
* Distinguish C- and perly- literals - PERLY_DOTBranislav Zahradník2020-12-271-1/+2
|
* Distinguish C- and perly- literals - PERLY_SEMICOLONBranislav Zahradník2020-12-271-7/+8
|
* Distinguish C- and perly- literals - PERLY_BRACKET_CLOSEBranislav Zahradník2020-12-271-1/+2
|
* Distinguish C- and perly- literals - PERLY_BRACKET_OPENBranislav Zahradník2020-12-271-5/+4
|
* Distinguish C- and perly- literals - PERLY_BRACE_CLOSEBranislav Zahradník2020-12-271-1/+2
|
* Distinguish C- and perly- literals - PERLY_BRACE_OPENBranislav Zahradník2020-12-271-2/+8
| | | | | regardless of the fact that both have same value their meaning is different and should not be mixed
* toke.c: Eliminate temporary variables base, Base and max.TAKAI Kousuke2020-12-071-9/+6
| | | | | | | | | | | These variables are only used on emitting diagnostic messages. Calculating them on-demand will make the code slightly faster on normal cases. Note: previously bases[], Bases[] and maxima[] may be completely optimized out by fusing array accesses into if-brances. Now they become real arrays, and will slightly increase the number of dynamic relocations on PIC build.
* toke.c: Preserve "0o" prefix on warnings and strings passed to overload hook.TAKAI Kousuke2020-12-071-1/+8
|
* toke.c: Recognize "0odddd" octal literals.TAKAI Kousuke2020-12-071-4/+8
| | | | t/base/num.t: Add some test for "0odddd" octals.
* toke.c: Use SvPV_shrink_to_curKarl Williamson2020-08-221-1/+1
| | | | which is what it is doing, instead of the more general SvPV_renew.
* Use PERL_REVISION in toke.c for -E switch☢ ℕicolas ℝ2020-08-041-1/+1
| | | | | This allows to use the current features bundle defined by the current version of Perl.
* Remove obsolete FCRYPT ifdefs and associated PL_cryptseen (#17624)Richard Leach2020-07-301-6/+1
| | | Co-authored-by: Karl Williamson <khw@cpan.org>
* Remove use of dVAR in coreDagfinn Ilmari Mannsåker2020-07-201-7/+0
| | | | | It only does anything under PERL_GLOBAL_STRUCT, which is gone. Keep the dNOOP defintion for CPAN back-compat
* eliminate recursion from yyl_fake_eof() into yyl_try()Tony Cook2020-05-211-14/+46
| | | | | | | This is intended as a minimal commit due to the current stage of the release process. fixes #17268
* eliminate len from recursive yyl_try/yyl_fake_eofTony Cook2020-05-211-10/+9
| | | | | len is only used in these functions to pass to the other function when recursing.
* removed unused len parameter from yyl_dblquote()Tony Cook2020-05-211-2/+3
| | | | | The len variable is used, but the value is overwritten before being read.
* Remove spurious double spaces before open braces in core C codeDagfinn Ilmari Mannsåker2020-04-131-1/+1
|
* gh-17645: avoid oob read on conflict marker detectionHugo van der Sanden2020-03-271-3/+3
| | | | Introduced in 0ae5281a2d.
* chained comparisonsZefram2020-03-121-22/+28
|
* Fix variable name in wrap_keyword_plugin documentationStefan Seifert2020-03-051-1/+1
|
* Add 'indirect' feature that can be turned off to disable indirect object syntaxDagfinn Ilmari Mannsåker2020-02-161-1/+4
| | | | Co-authored-by: Tony Cook <tony@develop-help.com>
* toke.c: Split code to load _charnames.pm into own fncKarl Williamson2020-02-121-29/+62
| | | | This is in preparation for it being called from more than one place.