mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-15 07: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:
@@ -20,19 +20,24 @@
|
||||
#ifndef NAMED_REF_H_
|
||||
# define NAMED_REF_H_
|
||||
|
||||
#include "uniqstr.h"
|
||||
#include "location.h"
|
||||
#include "uniqstr.h"
|
||||
|
||||
typedef struct named_ref named_ref;
|
||||
|
||||
struct named_ref
|
||||
/* Named reference object. Keeps information about
|
||||
a symbolic name of a symbol in a rule. */
|
||||
typedef struct named_ref
|
||||
{
|
||||
/* Symbolic named given by user. */
|
||||
uniqstr id;
|
||||
location loc;
|
||||
};
|
||||
|
||||
/* Location of the symbolic name. Not including brackets. */
|
||||
location loc;
|
||||
} named_ref;
|
||||
|
||||
/* Allocate a named reference object. */
|
||||
named_ref *named_ref_new (uniqstr id, location loc);
|
||||
|
||||
/* Free a named reference object. */
|
||||
void named_ref_free (named_ref *r);
|
||||
|
||||
#endif /* !NAMED_REF_H_ */
|
||||
|
||||
Reference in New Issue
Block a user