mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-19 09:13:04 +00:00
style: sort includes and avoid assignments
* src/symtab.c: Sort includes. * src/gram.c (grammar_rules_print_xml): Avoid assignments to define 'usefulness'.
This commit is contained in:
11
src/gram.c
11
src/gram.c
@@ -218,13 +218,10 @@ grammar_rules_print_xml (FILE *out, int level)
|
|||||||
xml_puts (out, level + 1, "<rules>");
|
xml_puts (out, level + 1, "<rules>");
|
||||||
first = false;
|
first = false;
|
||||||
{
|
{
|
||||||
char const *usefulness;
|
char const *usefulness
|
||||||
if (rule_useless_in_grammar_p (&rules[r]))
|
= rule_useless_in_grammar_p (&rules[r]) ? "useless-in-grammar"
|
||||||
usefulness = "useless-in-grammar";
|
: rule_useless_in_parser_p (&rules[r]) ? "useless-in-parser"
|
||||||
else if (rule_useless_in_parser_p (&rules[r]))
|
: "useful";
|
||||||
usefulness = "useless-in-parser";
|
|
||||||
else
|
|
||||||
usefulness = "useful";
|
|
||||||
xml_indent (out, level + 2);
|
xml_indent (out, level + 2);
|
||||||
fprintf (out, "<rule number=\"%d\" usefulness=\"%s\"",
|
fprintf (out, "<rule number=\"%d\" usefulness=\"%s\"",
|
||||||
rules[r].number, usefulness);
|
rules[r].number, usefulness);
|
||||||
|
|||||||
@@ -19,13 +19,14 @@
|
|||||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
#include "symtab.h"
|
||||||
|
|
||||||
#include "system.h"
|
#include "system.h"
|
||||||
|
|
||||||
#include <hash.h>
|
#include <hash.h>
|
||||||
|
|
||||||
#include "complain.h"
|
#include "complain.h"
|
||||||
#include "gram.h"
|
#include "gram.h"
|
||||||
#include "symtab.h"
|
|
||||||
|
|
||||||
/*-------------------------------------------------------------------.
|
/*-------------------------------------------------------------------.
|
||||||
| Symbols sorted by tag. Allocated by the first invocation of |
|
| Symbols sorted by tag. Allocated by the first invocation of |
|
||||||
|
|||||||
Reference in New Issue
Block a user