On 03/05/2013 08:00 AM, John Goodyear wrote:



 > On 03/04/2013 02:26 PM, John Goodyear wrote:
 > >  >
 > >  > On 03/04/2013 12:40 PM, John Goodyear wrote:
 > >  > >
 > >  > >  > On 03/04/2013 11:35 AM, John Goodyear wrote:
 > >  > >  > >
 > >  > >  > >  > I tried to say in an earlier email that the make after the
 > >  > > miniperl gets
 > >  > >  > >  > linked is likely to fail spectacularly.  Instead of
continuing
 > >  > > the make
 > >  > >  > >  > at this point, use the already-linked miniperl and
dothe Hello
 > >  > > world
 > >  > >  > > test:
 > >  > >  > >  >
 > >  > >  > >  > ./miniperl -le 'print "Hello World"'
 > >  > >  > >  >
 > >  > >  > >
 > >  > >  > > This too, fails with ~643K lines of
 > >  > >  > >
 > >  > >  > >     Semicolon seems to be missing
 > >  > >  > >
 > >  > >  > > And then finally
 > >  > >  > >
 > >  > >  > >     Out of memory!
 > >  > >  > >
 > >  > >  >
 > >  > >  >
 > >  > >  > What happens if you add a semi-colon?
 > >  > >  >
 > >  > >  > ./miniperl -le 'print "Hello World";'
 > >  > >  >
 > >  > >
 > >  > > No change.
 > >  > >
 > >  >
 > >  > That's unfortunate. Take the attached file and replace the one
on your
 > >  > system with it, and run make again, and see what happens.
 > >  > [attachment "l1_char_class_tab.h" deleted by John
 > > Goodyear/Gaithersburg/IBM]
 > >
 > > I addition to substituting the l1_char_class_tab.h that you provided, I
 > > put a print statement into perly.c to display the yylex() return value
 > >
 > > After that, I deleted miniperl and all of the object files and rebuilt
 > > miniperl.
 > >
 > > miniperl now terminates in a more reasonable manner...
 > >
 > >
 > >
 > > /u/jgood/perlsrc/perl-3a3d7b8 >./miniperl -le 'print "Hello World"' >
 > > output 2>&1
 > > /u/jgood/perlsrc/perl-3a3d7b8 >cat output
 > > syntax error at -e line 1, at EOF
 > > Execution of -e aborted due to compilation errors.
 > > JCG: yylex returns 301: 'ýè'
 > > JCG: yylex returns 267: 'ðê'
 > > JCG: yylex returns 94: ';'
 > > JCG: yylex returns 0: ''
 > >
 > >
 > > /u/jgood/perlsrc/perl-3a3d7b8 >./miniperl -le 'print "Hello World";' >
 > > output 2>&1
 > > /u/jgood/perlsrc/perl-3a3d7b8 >cat output
 > > syntax error at -e line 1, near ""Hello World";"
 > > Execution of -e aborted due to compilation errors.
 > > JCG: yylex returns 301: 'ýè'
 > > JCG: yylex returns 267: 'ðê'
 > > JCG: yylex returns 94: ';'
 > > JCG: yylex returns 94: ';'
 > > JCG: yylex returns 0: ''
 > >
 > >
 > > FYI:  Before replacing l1_char_class_tab.h,  this is the character that
 > > was almost always output from my trace:
 > >
 > >     JCG: yylex returns 264: 'ðñ'    ('ðñ' is represented as '\214\111'
 > >     when the output is run through more)
 > >
 >
 > I had another idea after I sent this.  When I was going through and
 > cleaning up EBCDIC handling, some things seemed so off-the-wall wrong
 > that I wasn't sure if I just misunderstood, or if things had gotten so
 > very far out-of-sync in the many years since we've tried EBCDIC.  One of
 > those places involved perly.y.  Attached is a patch to try that
 > reinstates what I removed.  I presumed that the table that drives this
 > would be recomputed in native character set terms.  But I may be very
 > wrong, not understanding this area of the code at all.  Hopefully, I was
 > wrong, and this will work.

Karl, as you suspected, the 2nd header file you sent did not help.  The
0088-XXX-perly.c-Reinstate-some-ebcdic-code.patch didn't seem to help
either.

Under default compilation z/OS, the compiler expecs the character set of
the strings and characters in the code to be IBM-1047.  Under default
runtime conditions, the I/O is assumed to be IBM-1047 as well.   I have
been trying to conserve bandwidth and haven't tried to absorb the code,
so now, I wonder what's going on with all of the tables.  The yylex
output that I print (above) doesn't represent what I fed miniperl.


The numbers that your print is outputting look right to me. The ones above 255 are from the enum yytokentype in perly.h. I get the same values, except I get the ASCII value for the semicolon. Please send me a copy of your perly.tab.

And if you apply the attached patch, it should do debugging output without having to compile with -DDEBUGGING. Please send the output of this from the Hello world without the explicit semicolon, but with the
 0088-XXX-perly.c-Reinstate-some-ebcdic-code.patch
>From a9d4209961fc0e4a5bd440aa3a8a9adfaa705f1d Mon Sep 17 00:00:00 2001
From: Karl Williamson <[email protected]>
Date: Tue, 5 Mar 2013 10:36:07 -0700
Subject: [PATCH 89/89] XXX Enable lex debugging wihout -DDEBUGGING

---
 perly.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/perly.c b/perly.c
index d17f19b..6839f96 100644
--- a/perly.c
+++ b/perly.c
@@ -64,9 +64,9 @@ typedef signed char yysigned_char;
 #define YYERROR		goto yyerrlab1
 
 /* Enable debugging if requested.  */
-#ifdef DEBUGGING
+#if 1
 
-#  define yydebug (DEBUG_p_TEST)
+#  define yydebug (1)
 
 #  define YYFPRINTF PerlIO_printf
 
@@ -79,9 +79,9 @@ do {						\
 #  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 (PerlIO_stdout(), "%s ", Title);		\
+	yysymprint (aTHX_ PerlIO_stdout(),  Token, Value);	\
+	YYFPRINTF (PerlIO_stdout(), "\n");			\
     }								\
 } while (0)
 
-- 
1.8.1.3

Reply via email to