1995-08-09 08:06:35 -07:00
|
|
|
/***********************************************************************/
|
|
|
|
/* */
|
2011-07-27 07:17:02 -07:00
|
|
|
/* OCaml */
|
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 =",
|
2005-08-13 13:59:37 -07:00
|
|
|
" { Parsing.actions=yyact;",
|
|
|
|
" Parsing.transl_const=yytransl_const;",
|
|
|
|
" Parsing.transl_block=yytransl_block;",
|
|
|
|
" Parsing.lhs=yylhs;",
|
|
|
|
" Parsing.len=yylen;",
|
|
|
|
" Parsing.defred=yydefred;",
|
|
|
|
" Parsing.dgoto=yydgoto;",
|
|
|
|
" Parsing.sindex=yysindex;",
|
|
|
|
" Parsing.rindex=yyrindex;",
|
|
|
|
" Parsing.gindex=yygindex;",
|
|
|
|
" Parsing.tablesize=yytablesize;",
|
|
|
|
" Parsing.table=yytable;",
|
|
|
|
" Parsing.check=yycheck;",
|
|
|
|
" Parsing.error_function=parse_error;",
|
|
|
|
" Parsing.names_const=yynames_const;",
|
|
|
|
" Parsing.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
|
|
|
}
|
|
|
|
}
|