/* Lists of symbols for Bison
- Copyright (C) 2002, 2005 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2005, 2006 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
res->sym = sym;
res->location = loc;
+ res->midrule = NULL;
+ res->midrule_parent_rule = NULL;
+ res->midrule_parent_rhs_index = 0;
+
res->action = NULL;
res->used = false;
| Return its length. |
`--------------------*/
-unsigned int
-symbol_list_length (const symbol_list *l)
+int
+symbol_list_length (symbol_list const *l)
{
int res = 0;
- for (/* Nothing. */; l; l = l->next)
+ for (/* Nothing. */; l && l->sym; l = l->next)
++res;
return res;
}