1995-08-09 08:06:35 -07:00
|
|
|
/***********************************************************************/
|
|
|
|
/* */
|
1996-04-30 07:53:58 -07:00
|
|
|
/* Objective Caml */
|
1995-08-09 08:06:35 -07:00
|
|
|
/* */
|
|
|
|
/* Xavier Leroy, projet Cristal, INRIA Rocquencourt */
|
|
|
|
/* */
|
1996-04-30 07:53:58 -07:00
|
|
|
/* Copyright 1996 Institut National de Recherche en Informatique et */
|
1995-08-09 08:06:35 -07:00
|
|
|
/* Automatique. Distributed only by permission. */
|
|
|
|
/* */
|
|
|
|
/***********************************************************************/
|
|
|
|
|
1995-08-09 08:25:52 -07:00
|
|
|
/* Based on public-domain code from Berkeley Yacc */
|
|
|
|
|
1995-08-09 08:06:35 -07:00
|
|
|
/* $Id$ */
|
|
|
|
|
1995-05-04 03:15:53 -07:00
|
|
|
#include "defs.h"
|
|
|
|
|
|
|
|
char *header[] =
|
|
|
|
{
|
|
|
|
"open Parsing",
|
|
|
|
0
|
|
|
|
};
|
|
|
|
|
|
|
|
char *define_tables[] =
|
|
|
|
{
|
|
|
|
"let yytables =",
|
|
|
|
" { actions=yyact;",
|
1995-06-18 07:47:57 -07:00
|
|
|
" transl_const=yytransl_const;",
|
|
|
|
" transl_block=yytransl_block;",
|
1995-05-04 03:15:53 -07:00
|
|
|
" lhs=yylhs;",
|
|
|
|
" len=yylen;",
|
|
|
|
" defred=yydefred;",
|
|
|
|
" dgoto=yydgoto;",
|
|
|
|
" sindex=yysindex;",
|
|
|
|
" rindex=yyrindex;",
|
|
|
|
" gindex=yygindex;",
|
|
|
|
" tablesize=yytablesize;",
|
|
|
|
" table=yytable;",
|
1995-08-09 02:39:43 -07:00
|
|
|
" check=yycheck;",
|
|
|
|
" error_function=parse_error }",
|
1995-05-04 03:15:53 -07:00
|
|
|
0
|
|
|
|
};
|
|
|
|
|
1995-08-08 09:44:29 -07:00
|
|
|
void write_section(section)
|
|
|
|
char **section;
|
1995-05-04 03:15:53 -07:00
|
|
|
{
|
|
|
|
register int i;
|
|
|
|
register FILE *fp;
|
|
|
|
|
|
|
|
fp = code_file;
|
|
|
|
for (i = 0; section[i]; ++i)
|
|
|
|
{
|
|
|
|
++outline;
|
|
|
|
fprintf(fp, "%s\n", section[i]);
|
|
|
|
}
|
|
|
|
}
|