[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Lynx-dev] Where's date_parse?

From: Thomas Dickey
Subject: Re: [Lynx-dev] Where's date_parse?
Date: Sun, 21 Dec 2008 20:22:43 -0500 (EST)

On Sun, 21 Dec 2008, Paul Gilmartin wrote:

Hello, Lyncei,

Trying to diagnose a misbehavior peculiar to z/OS (formerly
OS/390), I'm trying to trace a call to date_parse in parsdate.c.
I find a prototype, but no body of date_parse.  Is this a
function I don't know about in a standard library, or have
I failed to understand the tangle of macro definitions, or
is there some other explanation entirely?

it's supposed to be in a new file, which I added in dev.10 (src/parsdate.c). It's a yacc parser, so the original source file
(src/parsdate.y) ends with ".y".  (lynx sources have both .c and .y)

gil:137$ grep date_parse `find . ! -type d`
../lynx2-8-7/src/parsdate.y:extern int date_parse(void);
../lynx2-8-7/src/parsdate.y:#define yyparse              date_parse
../lynx2-8-7/src/parsdate.y: if (date_parse() || yyHaveTime > 1 || yyHaveDate > 1)
../lynx2-8-7/src/parsdate.c:extern int date_parse(void);
../lynx2-8-7/src/parsdate.c:#define yyparse              date_parse
../lynx2-8-7/src/parsdate.c: if (date_parse() || yyHaveTime > 1 || yyHaveDate > 1)

"yyparse" is the entrypoint that yacc generates.
It's #define'd in the source to a name that's more suitable to the application. But in the "C" file, it's this chunk:

    int yym, yyn, yystate;

because of another #define

/* compatibility with bison */
/* compatibility with FreeBSD */
#define YYPARSE_DECL() yyparse(void *YYPARSE_PARAM)
#define YYPARSE_DECL() yyparse(void)
#endif /* YYPARSE_PARAM */

extern int YYPARSE_DECL();

Thomas E. Dickey

reply via email to

[Prev in Thread] Current Thread [Next in Thread]