mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-13 06:13:02 +00:00
Style changes and factoring.
* src/named-ref.h: Add comments. * src/parse-gram.y: Readability and style changes. * src/reader.c: Factoring: assign_named_ref function. * src/scan-code.l: Factoring and style changes. Rename parse_named_ref to parse_ref. Use "c-ctype.h" from gnulib. Use "unsigned" type for variant index. Improve readablity. * src/scan-gram.l: Change error messages and add comments. * src/symlist.h: symbol_list_null: New function decl. * src/symlist.c: symbol_list_null: Implement here. * tests/named-refs.at: Adjust for new error messages.
This commit is contained in:
@@ -27,10 +27,10 @@
|
||||
#include "getargs.h"
|
||||
#include "gram.h"
|
||||
#include "muscle-tab.h"
|
||||
#include "named-ref.h"
|
||||
#include "quotearg.h"
|
||||
#include "reader.h"
|
||||
#include "symlist.h"
|
||||
#include "named-ref.h"
|
||||
#include "scan-gram.h"
|
||||
#include "scan-code.h"
|
||||
|
||||
@@ -171,7 +171,7 @@ static int current_prec = 0;
|
||||
%token TAG "<tag>"
|
||||
%token TAG_ANY "<*>"
|
||||
%token TAG_NONE "<>"
|
||||
%token BRACKETED_ID "[id]"
|
||||
%token BRACKETED_ID "[identifier]"
|
||||
|
||||
%type <character> CHAR
|
||||
%printer { fputs (char_name ($$), stderr); } CHAR
|
||||
@@ -543,11 +543,9 @@ rhs:
|
||||
;
|
||||
|
||||
named_ref.opt:
|
||||
/* Nothing. */
|
||||
{ $$ = 0; }
|
||||
/* Nothing. */ { $$ = 0; }
|
||||
|
|
||||
BRACKETED_ID
|
||||
{ $$ = named_ref_new($1, @1); }
|
||||
BRACKETED_ID { $$ = named_ref_new($1, @1); }
|
||||
;
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user