1 /* $NetBSD: reader.c,v 1.2 2009/10/29 00:56:20 christos Exp $ */
2 /* Id: reader.c,v 1.18 2009/10/27 09:04:07 tom Exp */
7 __RCSID("$NetBSD: reader.c,v 1.2 2009/10/29 00:56:20 christos Exp $");
9 /* The line size must be a positive integer. One hundred was chosen */
10 /* because few lines in Yacc input grammars exceed 100 characters. */
11 /* Note that if a line exceeds LINESIZE characters, the line buffer */
12 /* will be expanded to accomodate it. */
19 static void start_rule(bucket
*bp
, int s_lineno
);
22 static int cinc
, cache_size
;
26 static char **tag_table
;
36 static char last_was_action
;
39 static bucket
**pitem
;
44 static size_t name_pool_size
;
45 static char *name_pool
;
47 char line_format
[] = "#line %d \"%s\"\n";
54 if (cinc
>= cache_size
)
57 cache
= REALLOC(cache
, cache_size
);
61 cache
[cinc
] = (char)c
;
72 if (saw_eof
|| (c
= getc(f
)) == EOF
)
84 if (line
== 0 || linesize
!= (LINESIZE
+ 1))
88 linesize
= LINESIZE
+ 1;
89 line
= MALLOC(linesize
);
106 linesize
+= LINESIZE
;
107 line
= REALLOC(line
, linesize
);
132 p
= MALLOC(s
- line
+ 1);
138 while ((*t
++ = *s
++) != '\n')
148 int st_lineno
= lineno
;
149 char *st_line
= dup_line();
150 char *st_cptr
= st_line
+ (cptr
- line
);
155 if (*s
== '*' && s
[1] == '/')
165 unterminated_comment(st_lineno
, st_line
, st_cptr
);
219 else if (s
[1] == '/')
254 else if (isdigit(c
) || c
== '-' || c
== '_' || c
== '.' || c
== '$')
262 if (strcmp(cache
, "token") == 0 || strcmp(cache
, "term") == 0)
264 if (strcmp(cache
, "type") == 0)
266 if (strcmp(cache
, "left") == 0)
268 if (strcmp(cache
, "right") == 0)
270 if (strcmp(cache
, "nonassoc") == 0 || strcmp(cache
, "binary") == 0)
272 if (strcmp(cache
, "start") == 0)
274 if (strcmp(cache
, "union") == 0)
276 if (strcmp(cache
, "ident") == 0)
278 if (strcmp(cache
, "expect") == 0)
280 if (strcmp(cache
, "expect-rr") == 0)
282 if (strcmp(cache
, "pure-parser") == 0)
283 return (PURE_PARSER
);
284 if (strcmp(cache
, "parse-param") == 0)
285 return (PARSE_PARAM
);
286 if (strcmp(cache
, "lex-param") == 0)
294 if (c
== '%' || c
== '\\')
305 syntax_error(lineno
, line
, t_cptr
);
309 struct param
*lex_param
;
310 struct param
*parse_param
;
313 * Keep a linked list of parameters
336 buf
= MALLOC(linesize
);
340 for (i
= 0; (c
= *cptr
++) != '}'; i
++) {
350 while (i
>= 0 && isspace((unsigned char)buf
[i
]))
352 while (i
>= 0 && isalnum((unsigned char)buf
[i
]))
355 if (!isspace((unsigned char)buf
[i
]) && buf
[i
] != '*')
358 p
= MALLOC(sizeof(*p
));
362 p
->name
= strdup(buf
+ i
+ 1);
388 syntax_error(lineno
, line
, cptr
);
397 FILE *f
= output_file
;
403 syntax_error(lineno
, line
, cptr
);
405 fprintf(f
, "#ident \"");
430 int need_newline
= 0;
431 int t_lineno
= lineno
;
432 char *t_line
= dup_line();
433 char *t_cptr
= t_line
+ (cptr
- line
- 2);
439 unterminated_text(t_lineno
, t_line
, t_cptr
);
442 fprintf(f
, line_format
, lineno
, input_file_name
);
455 unterminated_text(t_lineno
, t_line
, t_cptr
);
460 int s_lineno
= lineno
;
461 char *s_line
= dup_line();
462 char *s_cptr
= s_line
+ (cptr
- line
- 1);
477 unterminated_string(s_lineno
, s_line
, s_cptr
);
486 unterminated_string(s_lineno
, s_line
, s_cptr
);
499 while ((c
= *++cptr
) != '\n')
501 if (c
== '*' && cptr
[1] == '/')
511 int c_lineno
= lineno
;
512 char *c_line
= dup_line();
513 char *c_cptr
= c_line
+ (cptr
- line
- 1);
521 if (c
== '*' && *cptr
== '/')
532 unterminated_comment(c_lineno
, c_line
, c_cptr
);
564 int u_lineno
= lineno
;
565 char *u_line
= dup_line();
566 char *u_cptr
= u_line
+ (cptr
- line
- 6);
569 over_unionized(cptr
- 6);
573 fprintf(text_file
, line_format
, lineno
, input_file_name
);
575 fprintf(text_file
, "typedef union YYSTYPE");
577 fprintf(union_file
, "typedef union YYSTYPE");
591 unterminated_union(u_lineno
, u_line
, u_cptr
);
601 fprintf(text_file
, " YYSTYPE;\n");
610 int s_lineno
= lineno
;
611 char *s_line
= dup_line();
612 char *s_cptr
= s_line
+ (cptr
- line
- 1);
627 unterminated_string(s_lineno
, s_line
, s_cptr
);
638 unterminated_string(s_lineno
, s_line
, s_cptr
);
648 putc('*', text_file
);
650 putc('*', union_file
);
651 while ((c
= *++cptr
) != '\n')
653 if (c
== '*' && cptr
[1] == '/')
655 fprintf(text_file
, "* ");
657 fprintf(union_file
, "* ");
666 fprintf(text_file
, "*/\n");
668 fprintf(union_file
, "*/\n");
673 int c_lineno
= lineno
;
674 char *c_line
= dup_line();
675 char *c_cptr
= c_line
+ (cptr
- line
- 1);
677 putc('*', text_file
);
679 putc('*', union_file
);
687 if (c
== '*' && *cptr
== '/')
689 putc('/', text_file
);
691 putc('/', union_file
);
700 unterminated_comment(c_lineno
, c_line
, c_cptr
);
714 if (c
>= '0' && c
<= '9')
716 if (c
>= 'A' && c
<= 'F')
717 return (c
- 'A' + 10);
718 if (c
>= 'a' && c
<= 'f')
719 return (c
- 'a' + 10);
731 int s_lineno
= lineno
;
732 char *s_line
= dup_line();
733 char *s_cptr
= s_line
+ (cptr
- line
);
743 unterminated_string(s_lineno
, s_line
, s_cptr
);
746 char *c_cptr
= cptr
- 1;
754 unterminated_string(s_lineno
, s_line
, s_cptr
);
769 n
= (n
<< 3) + (c
- '0');
773 n
= (n
<< 3) + (c
- '0');
778 illegal_character(c_cptr
);
785 if (n
< 0 || n
>= 16)
786 illegal_character(c_cptr
);
791 if (i
< 0 || i
>= 16)
796 illegal_character(c_cptr
);
833 for (i
= 0; i
< n
; ++i
)
842 for (i
= 0; i
< n
; ++i
)
844 c
= ((unsigned char *)s
)[i
];
845 if (c
== '\\' || c
== cache
[0])
879 cachec(((c
>> 6) & 7) + '0');
880 cachec(((c
>> 3) & 7) + '0');
881 cachec((c
& 7) + '0');
895 if (n
== 1 && bp
->value
== UNDEFINED
)
896 bp
->value
= *(unsigned char *)s
;
903 is_reserved(char *name
)
907 if (strcmp(name
, ".") == 0 ||
908 strcmp(name
, "$accept") == 0 ||
909 strcmp(name
, "$end") == 0)
912 if (name
[0] == '$' && name
[1] == '$' && isdigit((unsigned char)name
[2]))
915 while (isdigit((unsigned char)*s
))
930 for (c
= *cptr
; IS_IDENT(c
); c
= *++cptr
)
934 if (is_reserved(cache
))
935 used_reserved(cache
);
937 return (lookup(cache
));
947 for (c
= *cptr
; isdigit(c
); c
= *++cptr
)
948 n
= (Value_t
) (10 * n
+ (c
- '0'));
959 int t_lineno
= lineno
;
960 char *t_line
= dup_line();
961 char *t_cptr
= t_line
+ (cptr
- line
);
967 if (!isalpha(c
) && c
!= '_' && c
!= '$')
968 illegal_tag(t_lineno
, t_line
, t_cptr
);
983 illegal_tag(t_lineno
, t_line
, t_cptr
);
986 for (i
= 0; i
< ntags
; ++i
)
988 if (strcmp(cache
, tag_table
[i
]) == 0)
991 return (tag_table
[i
]);
998 tag_table
= (char **)
1000 ? REALLOC(tag_table
, (unsigned)tagmax
* sizeof(char *))
1001 : MALLOC((unsigned)tagmax
* sizeof(char *)));
1010 tag_table
[ntags
] = s
;
1017 declare_tokens(int assoc
)
1040 if (isalpha(c
) || c
== '_' || c
== '.' || c
== '$')
1042 else if (c
== '\'' || c
== '"')
1048 tokenized_start(bp
->name
);
1053 if (bp
->tag
&& tag
!= bp
->tag
)
1054 retyped_warning(bp
->name
);
1060 if (bp
->prec
&& prec
!= bp
->prec
)
1061 reprec_warning(bp
->name
);
1062 bp
->assoc
= (Assoc_t
) assoc
;
1072 value
= get_number();
1073 if (bp
->value
!= UNDEFINED
&& value
!= bp
->value
)
1074 revalued_warning(bp
->name
);
1084 * %expect requires special handling
1085 * as it really isn't part of the yacc
1086 * grammar only a flag for yacc proper.
1089 declare_expect(int assoc
)
1093 if (assoc
!= EXPECT
&& assoc
!= EXPECT_RR
)
1097 * Stay away from nextc - doesn't
1098 * detect EOL and will read to EOF.
1108 if (assoc
== EXPECT
)
1109 SRexpect
= get_number();
1111 RRexpect
= get_number();
1115 * Looking for number before EOL.
1116 * Spaces, tabs, and numbers are ok,
1117 * words, punc., etc. are syntax errors.
1119 else if (c
== '\n' || isalpha(c
) || !isspace(c
))
1121 syntax_error(lineno
, line
, cptr
);
1143 syntax_error(lineno
, line
, cptr
);
1149 if (isalpha(c
) || c
== '_' || c
== '.' || c
== '$')
1151 else if (c
== '\'' || c
== '"')
1156 if (bp
->tag
&& tag
!= bp
->tag
)
1157 retyped_warning(bp
->name
);
1171 if (!isalpha(c
) && c
!= '_' && c
!= '.' && c
!= '$')
1172 syntax_error(lineno
, line
, cptr
);
1174 if (bp
->class == TERM
)
1175 terminal_start(bp
->name
);
1176 if (goal
&& goal
!= bp
)
1177 restarted_warning();
1182 read_declarations(void)
1187 cache
= MALLOC(cache_size
);
1197 syntax_error(lineno
, line
, cptr
);
1198 switch (k
= keyword())
1248 initialize_grammar(void)
1252 pitem
= (bucket
**)MALLOC((unsigned)maxitems
* sizeof(bucket
*));
1262 plhs
= (bucket
**)MALLOC((unsigned)maxrules
* sizeof(bucket
*));
1268 rprec
= (short *)MALLOC((unsigned)maxrules
* sizeof(short));
1274 rassoc
= (char *)MALLOC((unsigned)maxrules
* sizeof(char));
1286 pitem
= (bucket
**)REALLOC(pitem
, (unsigned)maxitems
* sizeof(bucket
*));
1295 plhs
= (bucket
**)REALLOC(plhs
, (unsigned)maxrules
* sizeof(bucket
*));
1298 rprec
= (short *)REALLOC(rprec
, (unsigned)maxrules
* sizeof(short));
1301 rassoc
= (char *)REALLOC(rassoc
, (unsigned)maxrules
* sizeof(char));
1307 advance_to_start(void)
1334 syntax_error(lineno
, line
, s_cptr
);
1339 if (!isalpha(c
) && c
!= '_' && c
!= '.' && c
!= '_')
1340 syntax_error(lineno
, line
, cptr
);
1344 if (bp
->class == TERM
)
1345 terminal_start(bp
->name
);
1354 syntax_error(lineno
, line
, cptr
);
1355 start_rule(bp
, s_lineno
);
1360 start_rule(bucket
*bp
, int s_lineno
)
1362 if (bp
->class == TERM
)
1363 terminal_lhs(s_lineno
);
1364 bp
->class = NONTERM
;
1365 if (nrules
>= maxrules
)
1368 rprec
[nrules
] = UNDEFINED
;
1369 rassoc
[nrules
] = TOKEN
;
1377 if (!last_was_action
&& plhs
[nrules
]->tag
)
1379 if (pitem
[nitems
- 1])
1381 for (i
= nitems
- 1; (i
> 0) && pitem
[i
]; --i
)
1383 if (pitem
[i
+ 1] == 0 || pitem
[i
+ 1]->tag
!= plhs
[nrules
]->tag
)
1384 default_action_warning();
1388 last_was_action
= 0;
1389 if (nitems
>= maxitems
)
1397 insert_empty_rule(void)
1402 sprintf(cache
, "$$%d", ++gensym
);
1403 bp
= make_bucket(cache
);
1404 last_symbol
->next
= bp
;
1406 bp
->tag
= plhs
[nrules
]->tag
;
1407 bp
->class = NONTERM
;
1409 if ((nitems
+= 2) > maxitems
)
1411 bpp
= pitem
+ nitems
- 1;
1413 while ((bpp
[0] = bpp
[-1]) != 0)
1416 if (++nrules
>= maxrules
)
1418 plhs
[nrules
] = plhs
[nrules
- 1];
1419 plhs
[nrules
- 1] = bp
;
1420 rprec
[nrules
] = rprec
[nrules
- 1];
1421 rprec
[nrules
- 1] = 0;
1422 rassoc
[nrules
] = rassoc
[nrules
- 1];
1423 rassoc
[nrules
- 1] = TOKEN
;
1431 int s_lineno
= lineno
;
1434 if (c
== '\'' || c
== '"')
1443 start_rule(bp
, s_lineno
);
1448 if (last_was_action
)
1449 insert_empty_rule();
1450 last_was_action
= 0;
1452 if (++nitems
> maxitems
)
1454 pitem
[nitems
- 1] = bp
;
1458 after_blanks(char *s
)
1460 while (*s
!= '\0' && isspace((unsigned char)*s
))
1473 FILE *f
= action_file
;
1474 int a_lineno
= lineno
;
1475 char *a_line
= dup_line();
1476 char *a_cptr
= a_line
+ (cptr
- line
);
1478 if (last_was_action
)
1479 insert_empty_rule();
1480 last_was_action
= 1;
1482 fprintf(f
, "case %d:\n", nrules
- 2);
1484 fprintf(f
, line_format
, lineno
, input_file_name
);
1488 /* avoid putting curly-braces in first column, to ease editing */
1489 if (*after_blanks(cptr
) == L_CURL
)
1492 cptr
= after_blanks(cptr
);
1496 for (i
= nitems
- 1; pitem
[i
]; --i
)
1506 int d_lineno
= lineno
;
1507 char *d_line
= dup_line();
1508 char *d_cptr
= d_line
+ (cptr
- line
);
1515 fprintf(f
, "yyval.%s", tag
);
1520 else if (isdigit(c
))
1524 dollar_warning(d_lineno
, i
);
1525 fprintf(f
, "yyvsp[%d].%s", i
- n
, tag
);
1529 else if (c
== '-' && isdigit((unsigned char)cptr
[1]))
1532 i
= -get_number() - n
;
1533 fprintf(f
, "yyvsp[%d].%s", i
, tag
);
1538 dollar_error(d_lineno
, d_line
, d_cptr
);
1540 else if (cptr
[1] == '$')
1544 tag
= plhs
[nrules
]->tag
;
1547 fprintf(f
, "yyval.%s", tag
);
1550 fprintf(f
, "yyval");
1554 else if (isdigit((unsigned char)cptr
[1]))
1560 if (i
<= 0 || i
> n
)
1562 tag
= pitem
[nitems
+ i
- n
- 1]->tag
;
1564 untyped_rhs(i
, pitem
[nitems
+ i
- n
- 1]->name
);
1565 fprintf(f
, "yyvsp[%d].%s", i
- n
, tag
);
1570 dollar_warning(lineno
, i
);
1571 fprintf(f
, "yyvsp[%d]", i
- n
);
1575 else if (cptr
[1] == '-')
1581 fprintf(f
, "yyvsp[%d]", -i
- n
);
1585 if (isalpha(c
) || c
== '_' || c
== '$')
1592 while (isalnum(c
) || c
== '_' || c
== '$');
1604 unterminated_action(a_lineno
, a_line
, a_cptr
);
1609 fprintf(f
, "\nbreak;\n");
1620 fprintf(f
, "\nbreak;\n");
1627 int s_lineno
= lineno
;
1628 char *s_line
= dup_line();
1629 char *s_cptr
= s_line
+ (cptr
- line
- 1);
1642 unterminated_string(s_lineno
, s_line
, s_cptr
);
1651 unterminated_string(s_lineno
, s_line
, s_cptr
);
1662 while ((c
= *++cptr
) != '\n')
1664 if (c
== '*' && cptr
[1] == '/')
1674 int c_lineno
= lineno
;
1675 char *c_line
= dup_line();
1676 char *c_cptr
= c_line
+ (cptr
- line
- 1);
1684 if (c
== '*' && *cptr
== '/')
1695 unterminated_comment(c_lineno
, c_line
, c_cptr
);
1713 if (c
== '%' || c
== '\\')
1721 else if ((c
== 'p' || c
== 'P') &&
1722 ((c
= cptr
[2]) == 'r' || c
== 'R') &&
1723 ((c
= cptr
[3]) == 'e' || c
== 'E') &&
1724 ((c
= cptr
[4]) == 'c' || c
== 'C') &&
1725 ((c
= cptr
[5], !IS_IDENT(c
))))
1728 syntax_error(lineno
, line
, cptr
);
1731 if (isalpha(c
) || c
== '_' || c
== '.' || c
== '$')
1733 else if (c
== '\'' || c
== '"')
1737 syntax_error(lineno
, line
, cptr
);
1741 if (rprec
[nrules
] != UNDEFINED
&& bp
->prec
!= rprec
[nrules
])
1744 rprec
[nrules
] = bp
->prec
;
1745 rassoc
[nrules
] = bp
->assoc
;
1754 initialize_grammar();
1769 else if (c
== L_CURL
|| c
== '=')
1774 start_rule(plhs
[nrules
- 1], 0);
1783 syntax_error(lineno
, line
, cptr
);
1796 for (i
= 0; i
< ntags
; ++i
)
1798 assert(tag_table
[i
]);
1810 name_pool_size
= 13; /* 13 == sizeof("$end") + sizeof("$accept") */
1811 for (bp
= first_symbol
; bp
; bp
= bp
->next
)
1812 name_pool_size
+= strlen(bp
->name
) + 1;
1813 name_pool
= MALLOC(name_pool_size
);
1817 strlcpy(name_pool
, "$accept", name_pool_size
);
1818 strlcpy(name_pool
+ 8, "$end", name_pool_size
- 8);
1820 for (bp
= first_symbol
; bp
; bp
= bp
->next
)
1824 while ((*t
++ = *s
++) != 0)
1836 if (goal
->class == UNKNOWN
)
1837 undefined_goal(goal
->name
);
1839 for (bp
= first_symbol
; bp
; bp
= bp
->next
)
1841 if (bp
->class == UNKNOWN
)
1843 undefined_symbol_warning(bp
->name
);
1850 protect_string(char *src
, char **des
)
1863 if ('\\' == *s
|| '"' == *s
)
1868 *des
= d
= (char *)MALLOC(len
);
1874 if ('\\' == *s
|| '"' == *s
)
1891 for (bp
= first_symbol
; bp
; bp
= bp
->next
)
1894 if (bp
->class == TERM
)
1897 start_symbol
= (Value_t
) ntokens
;
1898 nvars
= nsyms
- ntokens
;
1900 symbol_name
= (char **)MALLOC((unsigned)nsyms
* sizeof(char *));
1901 if (symbol_name
== 0)
1903 symbol_value
= (short *)MALLOC((unsigned)nsyms
* sizeof(short));
1904 if (symbol_value
== 0)
1906 symbol_prec
= (short *)MALLOC((unsigned)nsyms
* sizeof(short));
1907 if (symbol_prec
== 0)
1909 symbol_assoc
= MALLOC(nsyms
);
1910 if (symbol_assoc
== 0)
1913 v
= (bucket
**)MALLOC((unsigned)nsyms
* sizeof(bucket
*));
1918 v
[start_symbol
] = 0;
1921 j
= (Value_t
) (start_symbol
+ 1);
1922 for (bp
= first_symbol
; bp
; bp
= bp
->next
)
1924 if (bp
->class == TERM
)
1929 assert(i
== ntokens
&& j
== nsyms
);
1931 for (i
= 1; i
< ntokens
; ++i
)
1934 goal
->index
= (Index_t
) (start_symbol
+ 1);
1935 k
= (Value_t
) (start_symbol
+ 2);
1945 for (i
= (Value_t
) (start_symbol
+ 1); i
< nsyms
; ++i
)
1955 for (i
= 1; i
< ntokens
; ++i
)
1960 for (j
= k
++; j
> 0 && symbol_value
[j
- 1] > n
; --j
)
1961 symbol_value
[j
] = symbol_value
[j
- 1];
1962 symbol_value
[j
] = n
;
1966 if (v
[1]->value
== UNDEFINED
)
1971 for (i
= 2; i
< ntokens
; ++i
)
1973 if (v
[i
]->value
== UNDEFINED
)
1975 while (j
< k
&& n
== symbol_value
[j
])
1977 while (++j
< k
&& n
== symbol_value
[j
])
1986 symbol_name
[0] = name_pool
+ 8;
1987 symbol_value
[0] = 0;
1989 symbol_assoc
[0] = TOKEN
;
1990 for (i
= 1; i
< ntokens
; ++i
)
1992 symbol_name
[i
] = v
[i
]->name
;
1993 symbol_value
[i
] = v
[i
]->value
;
1994 symbol_prec
[i
] = v
[i
]->prec
;
1995 symbol_assoc
[i
] = v
[i
]->assoc
;
1997 symbol_name
[start_symbol
] = name_pool
;
1998 symbol_value
[start_symbol
] = -1;
1999 symbol_prec
[start_symbol
] = 0;
2000 symbol_assoc
[start_symbol
] = TOKEN
;
2001 for (++i
; i
< nsyms
; ++i
)
2004 symbol_name
[k
] = v
[i
]->name
;
2005 symbol_value
[k
] = v
[i
]->value
;
2006 symbol_prec
[k
] = v
[i
]->prec
;
2007 symbol_assoc
[k
] = v
[i
]->assoc
;
2012 symbol_pname
= (char **)MALLOC((unsigned)nsyms
* sizeof(char *));
2013 if (symbol_pname
== 0)
2016 for (i
= 0; i
< nsyms
; ++i
)
2017 protect_string(symbol_name
[i
], &(symbol_pname
[i
]));
2031 ritem
= (short *)MALLOC((unsigned)nitems
* sizeof(short));
2034 rlhs
= (short *)MALLOC((unsigned)nrules
* sizeof(short));
2037 rrhs
= (short *)MALLOC((unsigned)(nrules
+ 1) * sizeof(short));
2040 rprec
= (short *)REALLOC(rprec
, (unsigned)nrules
* sizeof(short));
2043 rassoc
= REALLOC(rassoc
, nrules
);
2048 ritem
[1] = goal
->index
;
2053 rlhs
[2] = start_symbol
;
2059 for (i
= 3; i
< nrules
; ++i
)
2061 rlhs
[i
] = plhs
[i
]->index
;
2067 ritem
[j
] = pitem
[j
]->index
;
2068 if (pitem
[j
]->class == TERM
)
2070 prec2
= pitem
[j
]->prec
;
2071 assoc
= pitem
[j
]->assoc
;
2075 ritem
[j
] = (Value_t
) - i
;
2077 if (rprec
[i
] == UNDEFINED
)
2093 size_t j
, spacing
= 0;
2094 FILE *f
= verbose_file
;
2100 for (i
= 2; i
< nrules
; ++i
)
2102 if (rlhs
[i
] != rlhs
[i
- 1])
2106 fprintf(f
, "%4d %s :", i
- 2, symbol_name
[rlhs
[i
]]);
2107 spacing
= strlen(symbol_name
[rlhs
[i
]]) + 1;
2111 fprintf(f
, "%4d ", i
- 2);
2118 while (ritem
[k
] >= 0)
2120 fprintf(f
, " %s", symbol_name
[ritem
[k
]]);
2131 create_symbol_table();
2132 read_declarations();
2134 free_symbol_table();
2156 DO_FREE(symbol_name
);
2157 DO_FREE(symbol_prec
);
2158 DO_FREE(symbol_assoc
);
2159 DO_FREE(symbol_value
);