| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There are three pairs of characters that Perl recognizes as
metacharacters in regular expression patterns: {}, [], and (). These
can be used as well to delimit patterns, as in:
m{foo}
s(foo)(bar)
Since they are metacharacters, they have special meaning to regular
expression patterns, and it turns out that you can't turn off that
special meaning by the normal means of preceding them with a backslash,
if you use them, paired, within a pattern delimitted by them. For
example, in
m{foo\{1,3\}}
the backslashes do not change the behavior, and this matches "f", "o"
followed by one to three more occurrences of "o".
Usages like this, where they are interpreted as metacharacters, are
exceedingly rare; we think there are none, for example, in all of CPAN.
Hence, this deprecation should affect very little code. It does give
notice, however, that any such code needs to change, which will in turn
allow us to change the behavior in future Perl versions so that the
backslashes do have an effect, and without fear that we are silently
breaking any existing code.
=head1 Performance Enhancements
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This was discussed in thread
http://perl.markmail.org/thread/avtzvtpzemvg2ki2
but I never got around to this portion of the consensus, until now.
I did a cpan grep
http://grep.cpan.me/?q=%28^|[^\\]%29\\[0-7]{1%2C2}[8-9]&page=1
and eyeballing the results, saw three cases where this warning might
show up; one of which was for EBCDIC. The others looked to be false
positives, such as in .css files.
|
|
|
|
|
|
|
|
| |
If a hex or octal number is too big to fit in a 32 bit word, grok_oct
and grok_hex by default output a warning that it is a non-portable
value. This new parameter to the grok_bslash functions can cause them
to shut up those warnings. This is currently unused, but will be needed
in future commits.
|
|
|
|
|
| |
This flag bit is set in both branches of the code; it might as well be
initialized instead.
|
|
|
|
| |
This properly indents a newly-formed block
|
|
|
|
|
|
| |
This mode croaks on any iffy constructs that currently compile. It is
not currently used; documentation of the error messages will be
delivered later.
|
|
|
|
|
|
|
|
|
| |
These functions advance the parse pointer for the caller. The regex
code has the infrastructure to output a marker as to where the error
was. This commit simply moves the parse pointer past all the legal
digits in the input, which are likely supposed to be part of the number,
which makes it likely that the missing right brace point is just past
those.
|
|
|
|
|
|
| |
By passing the address of the parse pointer, the functions can advance
it, eliminating a parameter to the function, and simplifying the code in
the caller.
|
|
|
|
| |
The latter is more clearly named to indicate it includes the underscore.
|
|
|
|
|
|
|
|
| |
principally, proto.h was sometimes being included twice - once before
a fn decl, and once after - giving rise to a 'decl after def' warning.
Also, S_croak_memory_wrap was declared static in every source file, but
not used in some. So selectively disable the unused-function warning.
|
|
|
|
|
|
|
| |
This finishes the removal of register declarations started by
eb578fdb5569b91c28466a4d1939e381ff6ceaf4. It neglected the ones in
function parameter declarations, and didn't include things in dist, ext,
and lib, which this does include
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
There are three places that process \x. These can and did get out of
sync. This moves all three to use a common static inline function so
that they all do the same thing on the same inputs, and their behaviors
will not drift apart again.
This commit should not change current behavior. A previous commit
was designed to bring all three to identical behavior.
|
|
|
|
|
|
|
| |
This was and is a no-op on ASCII platforms, but on EBCDIC, when you did
e.g., a \o{7}, it would convert that to a 127. But it did not do this
on a \007, giving inconsistent results. Now, \o{7} yields 7, and thus
is consistent, and matches the documentation.
|
|
|
|
|
| |
This updates the editor hints in our files for Emacs and vim to request
that tabs be inserted as spaces.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Throughout 5.13 there was temporary code to deprecate and forbid
certain values of X following a \c in qq strings. This patch fixes
this to the final 5.14 semantics.
These are:
1) a utf8 non-ASCII character will croak. This is the same
behavior as pre-5.13, but it gives a correct error message, rather than
the malformed utf8 message previously.
2) \c{ and \cX where X is above ASCII will generate a deprecated
message. The intent is to remove these capabilities in 5.16. The
original agreement was to croak on above ASCII, but that does violate
our stability policy, so I'm deprecating it instead.
3) A non-deprecated warning is generated for all other \cX; this is the
same as throughout the 5.13 series.
I did not have the tuits to use \c{} as I had planned in 5.14, but \N{}
can be used instead.
|
| |
|
|
|
|
| |
No other changes were made
|
|
|
|
|
|
| |
This function is only used in the same places as dquote_static.c is
used, so move it there, and we won't have to worry about changing its
API will break something. No other changes made
|
|
|
|
|
|
|
| |
Actually I can't see any reason it actually *needs* thread context,
but 881ffab65cdbee2f146ada660e5593bad2e71472 added thread context
to the prototype without adding it to the function definition, thus
breaking builds with -Dusethreads.
|
|
|
|
| |
Change the regcurly definition to use the new inline abilities.
|
|
|
|
| |
As previously written, a test was executed unnecessarily
|
|
This patch extracts regcurly from regcomp.c and converts it
to a static inline function in a new file dquote_static.c
that is now #included by regcomp.c and toke.c. This change
will require 'make regen'.
|