[Top][All Lists]

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

[RFA] Fix glr.c's YY_ERROR_VERBOSE vs.'s

From: Paolo Bonzini
Subject: [RFA] Fix glr.c's YY_ERROR_VERBOSE vs.'s
Date: Tue, 12 Sep 2006 11:23:54 +0200
User-agent: Thunderbird (Macintosh/20060719)

Currently, testing is limited in because of a couple of bugs in itself. These bugs are due to's nature of thin wrapper around glr.c.

First, sets YY_ERROR_VERBOSE to 0 and glr.c interprets it as a request to *have* verbose errors, thanks to these directives:

# ...

This can be considered a bug in glr.c actually, and the same bug is also there in yacc.c (if you want, the same glr.c hunk applies to yacc.c as well). This patch fixes it using some preprocessor magic.

Second, yy::parser::set_debug_level is never defined unless %debug is specified. This because it just sets "::yydebug" to its argument, and the variable is not defined in glr.c unless YYDEBUG is defined. This patch also fixes it by making the function do nothing unless %debug is specified.

Unluckily, the testsuite changes enabled by this patch are tangled in my %language work, and I'd rather wait for the copyright assignment. In the meanwhile, these are bug fixes (albeit is undocumented) that could be applied as uncopyrightable.

Tested with no regressions.


reply via email to

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