~ubuntu-branches/ubuntu/saucy/ladr/saucy

« back to all changes in this revision

Viewing changes to ladr/parse.h.bak

  • Committer: Package Import Robot
  • Author(s): Frank Lichtenheld
  • Date: 2013-05-25 11:43:32 UTC
  • mfrom: (5.1.5 sid)
  • Revision ID: package-import@ubuntu.com-20130525114332-lkzco1dti2hwrf7v
Tags: 0.0.200911a-2
* QA upload.
* Upload to unstable.
* Change maintainer to QA group.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*  Copyright (C) 2006, 2007 William McCune
2
 
 
3
 
    This file is part of the LADR Deduction Library.
4
 
 
5
 
    The LADR Deduction Library is free software; you can redistribute it
6
 
    and/or modify it under the terms of the GNU General Public License,
7
 
    version 2.
8
 
 
9
 
    The LADR Deduction Library is distributed in the hope that it will be
10
 
    useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
11
 
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
 
    GNU General Public License for more details.
13
 
 
14
 
    You should have received a copy of the GNU General Public License
15
 
    along with the LADR Deduction Library; if not, write to the Free Software
16
 
    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
17
 
*/
18
 
 
19
 
#ifndef TP_PARSE_H
20
 
#define TP_PARSE_H
21
 
 
22
 
#include "listterm.h"
23
 
 
24
 
/* INTRODUCTION
25
 
This package has routines for reading and writing terms in
26
 
human-readable form.  Binary function symbols can be declared
27
 
to be infix with a precedence and left or right association,
28
 
so that many parentheses can be omitted.  Unary symbols
29
 
can be declared to be prefix or postfix.
30
 
In addition, prolog-style list-notation and quantified formulas are
31
 
supported.
32
 
<P>
33
 
The symbol declarations and parse rules are similar to the method
34
 
used by many Prolog systems (although we use mnemonic names 
35
 
instead of xfy, yfx, yf, etc.).  The symbol declarations
36
 
are made with set_parse_type().
37
 
<P>
38
 
This package is based on code taked form Otter and EQP, but there
39
 
are some important differences.  Detailed documentation should
40
 
be available elsewhere.
41
 
<P>
42
 
The intension is to use this package for reading
43
 
and writing all types of data (terms, clauses, formulas, control
44
 
information, etc.), with outside routines to translate to/from
45
 
the appropriate internal data structure when necessary.
46
 
*/
47
 
 
48
 
/* Public definitions */
49
 
 
50
 
/* End of public definitions */
51
 
 
52
 
/* Public function prototypes from parse.c */
53
 
 
54
 
void fprint_parse_mem(FILE *fp, BOOL heading);
55
 
 
56
 
void p_parse_mem(void);
57
 
 
58
 
void translate_neg_equalities(BOOL flag);
59
 
 
60
 
BOOL ordinary_constant_string(char *s);
61
 
 
62
 
Term sread_term(String_buf sb, FILE *fout);
63
 
 
64
 
Term read_term(FILE *fin, FILE *fout);
65
 
 
66
 
Term parse_term_from_string(char *s);
67
 
 
68
 
void sb_write_term(String_buf sb, Term t);
69
 
 
70
 
void fwrite_term(FILE *fp, Term t);
71
 
 
72
 
void fwrite_term_nl(FILE *fp, Term t);
73
 
 
74
 
char *process_quoted_symbol(char *str);
75
 
 
76
 
void declare_parse_type(char *str, int precedence, Parsetype type);
77
 
 
78
 
void declare_quantifier_precedence(int prec);
79
 
 
80
 
void declare_standard_parse_types(void);
81
 
 
82
 
BOOL redeclare_symbol_and_copy_parsetype(char *operation, char *str,
83
 
                                         BOOL echo, FILE *fout);
84
 
 
85
 
void skip_to_nl(FILE *fp);
86
 
 
87
 
Plist split_string(char *onlys);
88
 
 
89
 
void set_cons_char(char c);
90
 
 
91
 
char get_cons_char(void);
92
 
 
93
 
void set_quote_char(char c);
94
 
 
95
 
char get_quote_char(void);
96
 
 
97
 
void parenthesize(BOOL setting);
98
 
 
99
 
void check_for_illegal_symbols(BOOL setting);
100
 
 
101
 
#endif  /* conditional compilation of whole file */