[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Buffer problem
From: |
Hans Aberg |
Subject: |
Re: Buffer problem |
Date: |
Wed, 29 Dec 2004 19:15:33 +0100 |
User-agent: |
Microsoft-Outlook-Express-Macintosh-Edition/5.0.6 |
The problem I asked for was ont due to Flex, but a problem with the .l
scanner. It tried to close the standard output stream, and on my system that
caused other stream problems.
But in the course of debugging, I found the following changes useful:
do_action: /* This label is used only to access EOF actions. */
if ( yy_flex_debug )
{
if ( yy_act == 0 )
fprintf( stderr, "--scanner backing up\n" );
else if ( yy_act < 12 )
fprintf( stderr, "--accepting rule %d at line %d (\"%s\")\n",
yy_act, yy_rule_linenum[yy_act], yytext );
I.e., on the last output, also tell the rule number, as one then can check
which rule is causing the problem.
I also found it useful, before and after YY_INPUT, to tell how many
characters asked for to read and how many that was found. This way any
streams problem can be detected.
Hans Aberg
- Buffer problem, Hans Aberg, 2004/12/28
- Re: Buffer problem,
Hans Aberg <=