diff options
Diffstat (limited to 'toke.c')
-rw-r--r-- | toke.c | 43 |
1 files changed, 26 insertions, 17 deletions
@@ -26,9 +26,12 @@ #define yychar (*PL_yycharp) #define yylval (*PL_yylvalp) -static char const ident_too_long[] = "Identifier too long"; -static char const c_without_g[] = "Use of /c modifier is meaningless without /g"; -static char const c_in_subst[] = "Use of /c modifier is meaningless in s///"; +static const char ident_too_long[] = + "Identifier too long"; +static const char c_without_g[] = + "Use of /c modifier is meaningless without /g"; +static const char c_in_subst[] = + "Use of /c modifier is meaningless in s///"; static void restore_rsfp(pTHX_ void *f); #ifndef PERL_NO_UTF16_FILTER @@ -76,7 +79,7 @@ static I32 utf16rev_textfilter(pTHX_ int idx, SV *sv, int maxlen); #define LEX_KNOWNEXT 0 #ifdef DEBUGGING -static char const* lex_state_names[] = { +static const char* const lex_state_names[] = { "KNOWNEXT", "FORMLINE", "INTERPCONST", @@ -199,7 +202,8 @@ enum token_type { TOKENTYPE_GVVAL }; -static struct debug_tokens { const int token, type; const char *name; } debug_tokens[] = +static struct debug_tokens { const int token, type; const char *name; } + const debug_tokens[] = { { ADDOP, TOKENTYPE_OPNUM, "ADDOP" }, { ANDAND, TOKENTYPE_NONE, "ANDAND" }, @@ -1167,6 +1171,7 @@ S_sublex_start(pTHX) STATIC I32 S_sublex_push(pTHX) { + dVAR; ENTER; PL_lex_state = PL_sublex_info.super_state; @@ -1225,6 +1230,7 @@ S_sublex_push(pTHX) STATIC I32 S_sublex_done(pTHX) { + dVAR; if (!PL_lex_starts++) { SV *sv = newSVpvn("",0); if (SvUTF8(PL_linestr)) @@ -2271,7 +2277,7 @@ S_find_in_my_stash(pTHX_ const char *pkgname, I32 len) } #ifdef DEBUGGING - static char const* exp_name[] = + static const char* const exp_name[] = { "OPERATOR", "TERM", "REF", "STATE", "BLOCK", "ATTRBLOCK", "ATTRTERM", "TERMBLOCK", "TERMORDORDOR" }; @@ -2831,6 +2837,7 @@ Perl_yylex(pTHX) !instr(s,"indir") && instr(PL_origargv[0],"perl")) { + dVAR; char **newargv; *ipathend = '\0'; @@ -8939,7 +8946,7 @@ STATIC SV * S_new_constant(pTHX_ const char *s, STRLEN len, const char *key, SV *sv, SV *pv, const char *type) { - dSP; + dVAR; dSP; HV *table = GvHV(PL_hintgv); /* ^H */ SV *res; SV **cvp; @@ -9285,6 +9292,7 @@ S_scan_pat(pTHX_ char *start, I32 type) STATIC char * S_scan_subst(pTHX_ char *start) { + dVAR; register char *s; register PMOP *pm; I32 first_start; @@ -10151,16 +10159,17 @@ Perl_scan_num(pTHX_ const char *start, YYSTYPE* lvalp) I32 shift; bool overflowed = FALSE; bool just_zero = TRUE; /* just plain 0 or binary number? */ - static NV nvshift[5] = { 1.0, 2.0, 4.0, 8.0, 16.0 }; - static char const* bases[5] = { "", "binary", "", "octal", - "hexadecimal" }; - static char const* Bases[5] = { "", "Binary", "", "Octal", - "Hexadecimal" }; - static char const *maxima[5] = { "", - "0b11111111111111111111111111111111", - "", - "037777777777", - "0xffffffff" }; + static const NV nvshift[5] = { 1.0, 2.0, 4.0, 8.0, 16.0 }; + static const char* const bases[5] = + { "", "binary", "", "octal", "hexadecimal" }; + static const char* const Bases[5] = + { "", "Binary", "", "Octal", "Hexadecimal" }; + static const char* const maxima[5] = + { "", + "0b11111111111111111111111111111111", + "", + "037777777777", + "0xffffffff" }; const char *base, *Base, *max; /* check for hex */ |