summaryrefslogtreecommitdiff
path: root/perly.c
diff options
context:
space:
mode:
authorMichael G. Schwern <schwern@pobox.com>2020-12-28 18:04:52 -0800
committerKarl Williamson <khw@cpan.org>2021-01-17 09:18:15 -0700
commit1604cfb0273418ed479719f39def5ee559bffda2 (patch)
tree166a5ab935a029ab86cf6295d6f3cb77da22e559 /perly.c
parent557ff1b2a4ecd18fe9229e7e0eb8fa123adc5670 (diff)
downloadperl-1604cfb0273418ed479719f39def5ee559bffda2.tar.gz
style: Detabify indentation of the C code maintained by the core.
This just detabifies to get rid of the mixed tab/space indentation. Applying consistent indentation and dealing with other tabs are another issue. Done with `expand -i`. * vutil.* left alone, it's part of version. * Left regen managed files alone for now.
Diffstat (limited to 'perly.c')
-rw-r--r--perly.c98
1 files changed, 49 insertions, 49 deletions
diff --git a/perly.c b/perly.c
index ad79c49c49..20854ae542 100644
--- a/perly.c
+++ b/perly.c
@@ -93,15 +93,15 @@ typedef signed char yysigned_char;
# define YYDPRINTF(Args) \
do { \
if (yydebug) \
- YYFPRINTF Args; \
+ YYFPRINTF Args; \
} while (0)
# define YYDSYMPRINTF(Title, Token, Value) \
do { \
if (yydebug) { \
- YYFPRINTF (Perl_debug_log, "%s ", Title); \
- yysymprint (aTHX_ Perl_debug_log, Token, Value); \
- YYFPRINTF (Perl_debug_log, "\n"); \
+ YYFPRINTF (Perl_debug_log, "%s ", Title); \
+ yysymprint (aTHX_ Perl_debug_log, Token, Value); \
+ YYFPRINTF (Perl_debug_log, "\n"); \
} \
} while (0)
@@ -114,15 +114,15 @@ yysymprint(pTHX_ PerlIO * const yyoutput, int yytype, const YYSTYPE * const yyva
{
PERL_UNUSED_CONTEXT;
if (yytype < YYNTOKENS) {
- YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
+ YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
# ifdef YYPRINT
- YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
+ YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
# else
- YYFPRINTF (yyoutput, "0x%" UVxf, (UV)yyvaluep->ival);
+ YYFPRINTF (yyoutput, "0x%" UVxf, (UV)yyvaluep->ival);
# endif
}
else
- YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
+ YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
YYFPRINTF (yyoutput, ")");
}
@@ -139,36 +139,36 @@ yy_stack_print (pTHX_ const yy_parser *parser)
min = parser->ps - 8 + 1;
if (min <= parser->stack)
- min = parser->stack + 1;
+ min = parser->stack + 1;
PerlIO_printf(Perl_debug_log, "\nindex:");
for (ps = min; ps <= parser->ps; ps++)
- PerlIO_printf(Perl_debug_log, " %8d", (int)(ps - parser->stack));
+ PerlIO_printf(Perl_debug_log, " %8d", (int)(ps - parser->stack));
PerlIO_printf(Perl_debug_log, "\nstate:");
for (ps = min; ps <= parser->ps; ps++)
- PerlIO_printf(Perl_debug_log, " %8d", ps->state);
+ PerlIO_printf(Perl_debug_log, " %8d", ps->state);
PerlIO_printf(Perl_debug_log, "\ntoken:");
for (ps = min; ps <= parser->ps; ps++)
- PerlIO_printf(Perl_debug_log, " %8.8s", ps->name);
+ PerlIO_printf(Perl_debug_log, " %8.8s", ps->name);
PerlIO_printf(Perl_debug_log, "\nvalue:");
for (ps = min; ps <= parser->ps; ps++) {
- switch (yy_type_tab[yystos[ps->state]]) {
- case toketype_opval:
- PerlIO_printf(Perl_debug_log, " %8.8s",
- ps->val.opval
- ? PL_op_name[ps->val.opval->op_type]
- : "(Nullop)"
- );
- break;
- case toketype_ival:
- PerlIO_printf(Perl_debug_log, " %8" IVdf, (IV)ps->val.ival);
- break;
- default:
- PerlIO_printf(Perl_debug_log, " %8" UVxf, (UV)ps->val.ival);
- }
+ switch (yy_type_tab[yystos[ps->state]]) {
+ case toketype_opval:
+ PerlIO_printf(Perl_debug_log, " %8.8s",
+ ps->val.opval
+ ? PL_op_name[ps->val.opval->op_type]
+ : "(Nullop)"
+ );
+ break;
+ case toketype_ival:
+ PerlIO_printf(Perl_debug_log, " %8" IVdf, (IV)ps->val.ival);
+ break;
+ default:
+ PerlIO_printf(Perl_debug_log, " %8" UVxf, (UV)ps->val.ival);
+ }
}
PerlIO_printf(Perl_debug_log, "\n\n");
}
@@ -176,7 +176,7 @@ yy_stack_print (pTHX_ const yy_parser *parser)
# define YY_STACK_PRINT(parser) \
do { \
if (yydebug && DEBUG_v_TEST) \
- yy_stack_print (aTHX_ parser); \
+ yy_stack_print (aTHX_ parser); \
} while (0)
@@ -190,15 +190,15 @@ yy_reduce_print (pTHX_ int yyrule)
int yyi;
const unsigned int yylineno = yyrline[yyrule];
YYFPRINTF (Perl_debug_log, "Reducing stack by rule %d (line %u), ",
- yyrule - 1, yylineno);
+ yyrule - 1, yylineno);
/* Print the symbols being reduced, and their result. */
#if PERL_BISON_VERSION >= 30000 /* 3.0+ */
for (yyi = 0; yyi < yyr2[yyrule]; yyi++)
- YYFPRINTF (Perl_debug_log, "%s ",
+ YYFPRINTF (Perl_debug_log, "%s ",
yytname [yystos[(PL_parser->ps)[yyi + 1 - yyr2[yyrule]].state]]);
#else
for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++)
- YYFPRINTF (Perl_debug_log, "%s ", yytname [yyrhs[yyi]]);
+ YYFPRINTF (Perl_debug_log, "%s ", yytname [yyrhs[yyi]]);
#endif
YYFPRINTF (Perl_debug_log, "-> %s\n", yytname [yyr1[yyrule]]);
}
@@ -206,7 +206,7 @@ yy_reduce_print (pTHX_ int yyrule)
# define YY_REDUCE_PRINT(Rule) \
do { \
if (yydebug) \
- yy_reduce_print (aTHX_ Rule); \
+ yy_reduce_print (aTHX_ Rule); \
} while (0)
#else /* !DEBUGGING */
@@ -226,32 +226,32 @@ S_clear_yystack(pTHX_ const yy_parser *parser)
int i = 0;
if (!parser->stack)
- return;
+ return;
YYDPRINTF ((Perl_debug_log, "clearing the parse stack\n"));
for (i=0; i< parser->yylen; i++) {
- SvREFCNT_dec(ps[-i].compcv);
+ SvREFCNT_dec(ps[-i].compcv);
}
ps -= parser->yylen;
/* now free whole the stack, including the just-reduced ops */
while (ps > parser->stack) {
- LEAVE_SCOPE(ps->savestack_ix);
- if (yy_type_tab[yystos[ps->state]] == toketype_opval
- && ps->val.opval)
- {
- if (ps->compcv && (ps->compcv != PL_compcv)) {
- PL_compcv = ps->compcv;
- PAD_SET_CUR_NOSAVE(CvPADLIST(PL_compcv), 1);
- PL_comppad_name = PadlistNAMES(CvPADLIST(PL_compcv));
- }
- YYDPRINTF ((Perl_debug_log, "(freeing op)\n"));
- op_free(ps->val.opval);
- }
- SvREFCNT_dec(ps->compcv);
- ps--;
+ LEAVE_SCOPE(ps->savestack_ix);
+ if (yy_type_tab[yystos[ps->state]] == toketype_opval
+ && ps->val.opval)
+ {
+ if (ps->compcv && (ps->compcv != PL_compcv)) {
+ PL_compcv = ps->compcv;
+ PAD_SET_CUR_NOSAVE(CvPADLIST(PL_compcv), 1);
+ PL_comppad_name = PadlistNAMES(CvPADLIST(PL_compcv));
+ }
+ YYDPRINTF ((Perl_debug_log, "(freeing op)\n"));
+ op_free(ps->val.opval);
+ }
+ SvREFCNT_dec(ps->compcv);
+ ps--;
}
Safefree(parser->stack);
@@ -279,7 +279,7 @@ Perl_yyparse (pTHX_ int gramtype)
#define YYPUSHSTACK parser->ps = ++ps
/* The variable used to return semantic value and location from the
- action routines: ie $$. */
+ action routines: ie $$. */
YYSTYPE yyval;
YYDPRINTF ((Perl_debug_log, "Starting parse\n"));
@@ -592,7 +592,7 @@ Perl_yyparse (pTHX_ int gramtype)
yyacceptlab:
yyresult = 0;
for (ps=parser->ps; ps > parser->stack; ps--) {
- SvREFCNT_dec(ps->compcv);
+ SvREFCNT_dec(ps->compcv);
}
parser->ps = parser->stack; /* disable cleanup */
goto yyreturn;