* restriction. This special exception was added by the Free
* Software Foundation in version 1.24 of Bison.
*
- * Note that this file is also #included in madly.c, to allow compilation
- * of a second parser, Perl_madparse, that is identical to Perl_yyparse,
- * but which includes extra code for dumping the parse tree.
- * This is controlled by the PERL_IN_MADLY_C define.
*/
#include "EXTERN.h"
#define PERL_IN_PERLY_C
#include "perl.h"
+#include "feature.h"
typedef unsigned char yytype_uint8;
typedef signed char yytype_int8;
/* YYINITDEPTH -- initial size of the parser's stacks. */
#define YYINITDEPTH 200
+#ifdef YYDEBUG
+# undef YYDEBUG
+#endif
#ifdef DEBUGGING
# define YYDEBUG 1
#else
# define YYDEBUG 0
#endif
+#ifndef YY_NULL
+# define YY_NULL 0
+#endif
+
/* contains all the parser state tables; auto-generated from perly.y */
#include "perly.tab"
static void
yysymprint(pTHX_ PerlIO * const yyoutput, int yytype, const YYSTYPE * const yyvaluep)
{
+ PERL_UNUSED_CONTEXT;
if (yytype < YYNTOKENS) {
YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
# ifdef YYPRINT
: "(Nullop)"
);
break;
-#ifndef PERL_IN_MADLY_C
- case toketype_i_tkval:
-#endif
case toketype_ival:
PerlIO_printf(Perl_debug_log, " %8"IVdf, (IV)ps->val.ival);
break;
if (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);
`----------*/
int
-#ifdef PERL_IN_MADLY_C
-Perl_madparse (pTHX_ int gramtype)
-#else
Perl_yyparse (pTHX_ int gramtype)
-#endif
{
- dVAR;
int yystate;
int yyn;
int yyresult;
action routines: ie $$. */
YYSTYPE yyval;
-#ifndef PERL_IN_MADLY_C
-# ifdef PERL_MAD
- if (PL_madskills)
- return madparse(gramtype);
-# endif
-#endif
-
YYDPRINTF ((Perl_debug_log, "Starting parse\n"));
parser = PL_parser;
/* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
if (parser->yychar == YYEMPTY) {
YYDPRINTF ((Perl_debug_log, "Reading a token: "));
-#ifdef PERL_IN_MADLY_C
- parser->yychar = PL_madskills ? madlex() : yylex();
-#else
parser->yychar = yylex();
-#endif
+/* perly.tab is shipped based on an ASCII system; if it were to be regenerated
+ * on a platform that doesn't use ASCII, this translation back would need to be
+ * removed */
# ifdef EBCDIC
if (parser->yychar >= 0 && parser->yychar < 255) {
- parser->yychar = NATIVE_TO_ASCII(parser->yychar);
+ parser->yychar = NATIVE_TO_LATIN1(parser->yychar);
}
# endif
}
switch (yyn) {
-
-#define dep() deprecate("\"do\" to call subroutines")
-
-#ifdef PERL_IN_MADLY_C
-# define IVAL(i) (i)->tk_lval.ival
-# define PVAL(p) (p)->tk_lval.pval
-# define TOKEN_GETMAD(a,b,c) token_getmad((a),(b),(c))
-# define TOKEN_FREE(a) token_free(a)
-# define OP_GETMAD(a,b,c) op_getmad((a),(b),(c))
-# define IF_MAD(a,b) (a)
-# define DO_MAD(a) a
-# define MAD
-#else
-# define IVAL(i) (i)
-# define PVAL(p) (p)
-# define TOKEN_GETMAD(a,b,c)
-# define TOKEN_FREE(a)
-# define OP_GETMAD(a,b,c)
-# define IF_MAD(a,b) (b)
-# define DO_MAD(a)
-# undef MAD
-#endif
-
/* contains all the rule actions; auto-generated from perly.y */
#include "perly.act"