mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-17 00:03:03 +00:00
cex: use the glyphs
* src/derivation.c: here. * src/gram.h, src/gram.c (print_arrow, print_dot, print_fallback): Remove.
This commit is contained in:
37
src/gram.h
37
src/gram.h
@@ -103,8 +103,6 @@
|
||||
|
||||
# include "system.h"
|
||||
|
||||
# include <unicodeio.h>
|
||||
|
||||
# include "location.h"
|
||||
# include "symtab.h"
|
||||
|
||||
@@ -217,41 +215,6 @@ typedef struct
|
||||
extern rule *rules;
|
||||
extern rule_number nrules;
|
||||
|
||||
/* Fallback in case we can't print "•" or "→". */
|
||||
static inline long
|
||||
print_fallback (unsigned int code _GL_UNUSED,
|
||||
const char *msg _GL_UNUSED,
|
||||
void *callback_arg)
|
||||
{
|
||||
FILE *out = (FILE *) callback_arg;
|
||||
switch (code)
|
||||
{
|
||||
case 0x2022:
|
||||
putc ('.', out);
|
||||
break;
|
||||
case 0x2192:
|
||||
fputs ("->", out);
|
||||
break;
|
||||
default:
|
||||
abort ();
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
static inline void
|
||||
print_arrow (FILE *out)
|
||||
{
|
||||
unicode_to_mb (0x2192, fwrite_success_callback, print_fallback, out);
|
||||
}
|
||||
|
||||
/* Print "•", the symbol used to represent a point in an item (aka, a
|
||||
dotted rule). */
|
||||
static inline void
|
||||
print_dot (FILE *out)
|
||||
{
|
||||
unicode_to_mb (0x2022, fwrite_success_callback, print_fallback, out);
|
||||
}
|
||||
|
||||
/* Get the rule associated to this item. ITEM points inside RITEM. */
|
||||
static inline rule const *
|
||||
item_rule (item_number const *item)
|
||||
|
||||
Reference in New Issue
Block a user