mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 20:33:03 +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>");
|
||||
first = false;
|
||||
{
|
||||
char const *usefulness;
|
||||
if (rule_useless_in_grammar_p (&rules[r]))
|
||||
usefulness = "useless-in-grammar";
|
||||
else if (rule_useless_in_parser_p (&rules[r]))
|
||||
usefulness = "useless-in-parser";
|
||||
else
|
||||
usefulness = "useful";
|
||||
char const *usefulness
|
||||
= rule_useless_in_grammar_p (&rules[r]) ? "useless-in-grammar"
|
||||
: rule_useless_in_parser_p (&rules[r]) ? "useless-in-parser"
|
||||
: "useful";
|
||||
xml_indent (out, level + 2);
|
||||
fprintf (out, "<rule number=\"%d\" usefulness=\"%s\"",
|
||||
rules[r].number, usefulness);
|
||||
|
||||
@@ -19,13 +19,14 @@
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
#include <config.h>
|
||||
#include "symtab.h"
|
||||
|
||||
#include "system.h"
|
||||
|
||||
#include <hash.h>
|
||||
|
||||
#include "complain.h"
|
||||
#include "gram.h"
|
||||
#include "symtab.h"
|
||||
|
||||
/*-------------------------------------------------------------------.
|
||||
| Symbols sorted by tag. Allocated by the first invocation of |
|
||||
|
||||
Reference in New Issue
Block a user