* it calls S_force_word to stick the next word into the PL_next lookahead.
*
* Arguments:
- * char *start : start of the buffer
+ * char *start : buffer position (must be within PL_linestr)
* int token : PL_next will be this type of bare word (e.g., METHOD,WORD)
* int check_keyword : if true, Perl checks to make sure the word isn't
* a keyword (do this if the word is a label, e.g. goto FOO)
: UTF;
char *leaveit = /* set of acceptably-backslashed characters */
PL_lex_inpat
- ? "\\.^$@AGZdDwWsSbBpPXO+*?|()-nrtfeaxcz0123456789[{]} \t\n\r\f\v#"
+ ? "\\.^$@AGZdDwWsSbBpPXC+*?|()-nrtfeaxcz0123456789[{]} \t\n\r\f\v#"
: "";
while (s < send || dorange) {
}
continue;
- /* \C{latin small letter a} is a named character */
- case 'C':
+ /* \N{latin small letter a} is a named character */
+ case 'N':
++s;
if (*s == '{') {
char* e = strchr(s, '}');
char *why = Nullch;
if (!e) {
- yyerror("Missing right brace on \\C{}");
+ yyerror("Missing right brace on \\N{}");
e = s - 1;
goto cont_scan;
}
res = newSVpvn(s + 1, e - s - 1);
res = new_constant( Nullch, 0, "charnames",
- res, Nullsv, "\\C{...}" );
+ res, Nullsv, "\\N{...}" );
str = SvPV(res,len);
if (len > e - s + 4) {
char *odest = SvPVX(sv);
s = e + 1;
}
else
- yyerror("Missing braces on \\C{}");
+ yyerror("Missing braces on \\N{}");
continue;
/* \c is a control character */
really_sub:
{
char tmpbuf[sizeof PL_tokenbuf];
+ SSize_t tboffset;
expectation attrful;
bool have_name, have_proto;
int key = tmp;
{
PL_expect = XBLOCK;
attrful = XATTRBLOCK;
+ /* remember buffer pos'n for later force_word */
+ tboffset = s - PL_oldbufptr;
d = scan_word(s, tmpbuf, sizeof tmpbuf, TRUE, &len);
if (strchr(tmpbuf, ':'))
sv_setpv(PL_subname, tmpbuf);
if (*s == '=')
PL_lex_formbrack = PL_lex_brackets + 1;
if (have_name)
- (void) force_word(tmpbuf, WORD, FALSE, TRUE, TRUE);
+ (void) force_word(PL_oldbufptr + tboffset, WORD,
+ FALSE, TRUE, TRUE);
OPERATOR(FORMAT);
}
PL_expect = attrful;
if (have_proto) {
- PL_nextval[PL_nexttoke].opval = (OP*)newSVOP(OP_CONST, 0, PL_lex_stuff);
+ PL_nextval[PL_nexttoke].opval =
+ (OP*)newSVOP(OP_CONST, 0, PL_lex_stuff);
PL_lex_stuff = Nullsv;
force_next(THING);
}
sv_setpv(PL_subname,"__ANON__");
TOKEN(ANONSUB);
}
- (void) force_word(tmpbuf, WORD, FALSE, TRUE, TRUE);
+ (void) force_word(PL_oldbufptr + tboffset, WORD,
+ FALSE, TRUE, TRUE);
if (key == KEY_my)
TOKEN(MYSUB);
TOKEN(SUB);
s += 2;
}
/* check for a decimal in disguise */
- else if (strchr(".Ee", s[1]))
+ else if (s[1] == '.' || s[1] == 'e' || s[1] == 'E')
goto decimal;
/* so it must be octal */
else
dTHR;
overflowed = TRUE;
n = (NV) u;
- if (ckWARN_d(WARN_UNSAFE))
- Perl_warner(aTHX_ ((shift == 3) ?
- WARN_OCTAL : WARN_UNSAFE),
+ if (ckWARN_d(WARN_OVERFLOW))
+ Perl_warner(aTHX_ WARN_OVERFLOW,
"Integer overflow in %s number",
base);
} else
sv = NEWSV(92,0);
if (overflowed) {
dTHR;
- if (ckWARN(WARN_UNSAFE) && n > 4294967295.0)
- Perl_warner(aTHX_ WARN_UNSAFE,
+ if (ckWARN(WARN_PORTABLE) && n > 4294967295.0)
+ Perl_warner(aTHX_ WARN_PORTABLE,
"%s number > %s non-portable",
Base, max);
sv_setnv(sv, n);
else {
#if UV_SIZEOF > 4
dTHR;
- if (ckWARN(WARN_UNSAFE) && u > 0xffffffff)
- Perl_warner(aTHX_ WARN_UNSAFE,
+ if (ckWARN(WARN_PORTABLE) && u > 0xffffffff)
+ Perl_warner(aTHX_ WARN_PORTABLE,
"%s number > %s non-portable",
Base, max);
#endif