#define scalarvoid(a) Perl_scalarvoid(aTHX_ a)
#define scan_bin(a,b,c) Perl_scan_bin(aTHX_ a,b,c)
#define scan_hex(a,b,c) Perl_scan_hex(aTHX_ a,b,c)
-#define scan_num(a) Perl_scan_num(aTHX_ a)
+#define scan_num(a,b) Perl_scan_num(aTHX_ a,b)
#define scan_oct(a,b,c) Perl_scan_oct(aTHX_ a,b,c)
#define scope(a) Perl_scope(aTHX_ a)
#define screaminstr(a,b,c,d,e,f) Perl_screaminstr(aTHX_ a,b,c,d,e,f)
p |OP* |scalarvoid |OP* o
Ap |NV |scan_bin |char* start|I32 len|I32* retlen
Ap |NV |scan_hex |char* start|I32 len|I32* retlen
-Ap |char* |scan_num |char* s
+Ap |char* |scan_num |char* s|YYSTYPE *lvalp
Ap |NV |scan_oct |char* start|I32 len|I32* retlen
p |OP* |scope |OP* o
Ap |char* |screaminstr |SV* bigsv|SV* littlesv|I32 start_shift \
#undef Perl_scan_num
char*
-Perl_scan_num(pTHXo_ char* s)
+Perl_scan_num(pTHXo_ char* s, YYSTYPE *lvalp)
{
- return ((CPerlObj*)pPerl)->Perl_scan_num(s);
+ return ((CPerlObj*)pPerl)->Perl_scan_num(s, lvalp);
}
#undef Perl_scan_oct
break;
case 37:
#line 269 "perly.y"
-{ (void)scan_num("1"); yyval.opval = yylval.opval; }
+{ (void)scan_num("1", &yylval); yyval.opval = yylval.opval; }
break;
case 39:
#line 274 "perly.y"
;
texpr : /* NULL means true */
- { (void)scan_num("1"); $$ = yylval.opval; }
+ { (void)scan_num("1", &yylval); $$ = yylval.opval; }
| expr
;
PERL_CALLCONV OP* Perl_scalarvoid(pTHX_ OP* o);
PERL_CALLCONV NV Perl_scan_bin(pTHX_ char* start, I32 len, I32* retlen);
PERL_CALLCONV NV Perl_scan_hex(pTHX_ char* start, I32 len, I32* retlen);
-PERL_CALLCONV char* Perl_scan_num(pTHX_ char* s);
+PERL_CALLCONV char* Perl_scan_num(pTHX_ char* s, YYSTYPE *lvalp);
PERL_CALLCONV NV Perl_scan_oct(pTHX_ char* start, I32 len, I32* retlen);
PERL_CALLCONV OP* Perl_scope(pTHX_ OP* o);
PERL_CALLCONV char* Perl_screaminstr(pTHX_ SV* bigsv, SV* littlesv, I32 start_shift, I32 end_shift, I32 *state, I32 last);
for (; isDIGIT(*d) || *d == '_' || *d == '.'; d++);
if (*d == ';' || isSPACE(*d) || *d == '}' || !*d) {
SV *ver;
- s = scan_num(s);
+ s = scan_num(s, &yylval);
version = yylval.opval;
ver = cSVOPx(version)->op_sv;
if (SvPOK(ver) && !SvNIOK(ver)) {
Perl_yylex(pTHX)
#endif
{
-
+ dTHR;
int r;
#ifdef USE_PURE_BISON
-/* increment level and store the argument pointers */
- yyactlevel++;
- if (yyactlevel >= YYMAXLEVEL) {
-/* What to do ??? */
- }
yylval_pointer[yyactlevel] = lvalp;
yychar_pointer[yyactlevel] = lcharp;
- /* Save last pointer at the bottom */
- yylval_pointer[0] = lvalp;
- yychar_pointer[0] = lcharp;
+ yyactlevel++;
+ if (yyactlevel >= YYMAXLEVEL)
+ Perl_croak(aTHX_ "panic: YYMAXLEVEL");
#endif
r = S_syylex(aTHX);
/* FALL THROUGH */
case '0': case '1': case '2': case '3': case '4':
case '5': case '6': case '7': case '8': case '9':
- s = scan_num(s);
+ s = scan_num(s, &yylval);
if (PL_expect == XOPERATOR)
no_op("Number",s);
TERM(THING);
while (isDIGIT(*start) || *start == '_')
start++;
if (*start == '.' && isDIGIT(start[1])) {
- s = scan_num(s);
+ s = scan_num(s, &yylval);
TERM(THING);
}
/* avoid v123abc() or $h{v1}, allow C<print v10;> */
gv = gv_fetchpv(s, FALSE, SVt_PVCV);
*start = c;
if (!gv) {
- s = scan_num(s);
+ s = scan_num(s, &yylval);
TERM(THING);
}
}
*/
char *
-Perl_scan_num(pTHX_ char *start)
+Perl_scan_num(pTHX_ char *start, YYSTYPE* lvalp)
{
register char *s = start; /* current position in buffer */
register char *d; /* destination in temp buffer */
/* make the op for the constant and return */
if (sv)
- yylval.opval = newSVOP(OP_CONST, 0, sv);
+ lvalp->opval = newSVOP(OP_CONST, 0, sv);
else
- yylval.opval = Nullop;
+ lvalp->opval = Nullop;
return s;
}