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 */
|
1999-11-17 10:59:06 -08:00
|
|
|
/* en Automatique. All rights reserved. This file is distributed */
|
|
|
|
/* under the terms of the Q Public License version 1.0. */
|
1995-08-09 08:06:35 -07:00
|
|
|
/* */
|
|
|
|
/***********************************************************************/
|
|
|
|
|
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[] =
|
|
|
|
{
|
2002-11-02 14:36:46 -08:00
|
|
|
"open Parsing;;",
|
1995-05-04 03:15:53 -07:00
|
|
|
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;",
|
2001-11-05 05:34:42 -08:00
|
|
|
" error_function=parse_error;",
|
|
|
|
" names_const=yynames_const;",
|
|
|
|
" names_block=yynames_block }",
|
1995-05-04 03:15:53 -07:00
|
|
|
0
|
|
|
|
};
|
|
|
|
|
1997-09-02 05:55:01 -07:00
|
|
|
void write_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)
|
|
|
|
{
|
2001-07-12 05:54:24 -07:00
|
|
|
++outline;
|
|
|
|
fprintf(fp, "%s\n", section[i]);
|
1995-05-04 03:15:53 -07:00
|
|
|
}
|
|
|
|
}
|