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:
Alex Rozenman
2009-07-04 17:52:38 +03:00
parent 83ea2423f5
commit 872b52bc24
9 changed files with 222 additions and 195 deletions

View File

@@ -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); }
;