"Joel E. Denny" <[EMAIL PROTECTED]> writes:

> Searching for `#define' in the Open Group's yacc spec, I see no
> discussion of the yacc user ever specifying a #define.

You missed YYDEBUG.  Other than that, Posix doesn't say what happens
if the user #defines a macro beginning with YY -- the behavior is
undefined in that case, which is why Bison can depend on those
user-defined macros.

> So, macros should be only a Bison backward-compatibility issue, right?

If by that you mean "macros defined by the user whose names begin
with yy or YY", then I would demur for the following macros:

YYDEBUG
YYMAXDEPTH
YYSTYPE

since Solaris 10 yacc generates a parser whose behavior also depend on
these user-defined macros, in a way that's compatible with Bison.
(For what it's worth, the Solaris 10 parser also depends on YYEXPAND,
YYNMBCHARS, yyerror, and yylex.)


Reply via email to