Warning: Attempt to read property "date" on null in /usr/local/www/websvn.planix.org/blame.php on line 247

Warning: Attempt to read property "msg" on null in /usr/local/www/websvn.planix.org/blame.php on line 247
WebSVN – tendra.SVN – Blame – //branches/tendra4/src/utilities/sid/grammar.h – Rev 2

Subversion Repositories tendra.SVN

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 7u83 1
/*
2
    		 Crown Copyright (c) 1997
3
 
4
    This TenDRA(r) Computer Program is subject to Copyright
5
    owned by the United Kingdom Secretary of State for Defence
6
    acting through the Defence Evaluation and Research Agency
7
    (DERA).  It is made available to Recipients with a
8
    royalty-free licence for its use, reproduction, transfer
9
    to other parties and amendment for any purpose not excluding
10
    product development provided that any such use et cetera
11
    shall be deemed to be acceptance of the following conditions:-
12
 
13
        (1) Its Recipients shall ensure that this Notice is
14
        reproduced upon any copies or amended versions of it;
15
 
16
        (2) Any amended version of it shall be clearly marked to
17
        show both the nature of and the organisation responsible
18
        for the relevant amendment or amendments;
19
 
20
        (3) Its onward transfer from a recipient to another
21
        party shall be deemed to be that party's acceptance of
22
        these conditions;
23
 
24
        (4) DERA gives no warranty or assurance as to its
25
        quality or suitability for any purpose and DERA accepts
26
        no liability whatsoever in relation to any use to which
27
        it may be put.
28
*/
29
 
30
 
31
/*** grammar.h --- Grammar transforms frontend.
32
 *
33
 ** Author: Steve Folkes <smf@hermes.mod.uk>
34
 *
35
 *** Commentary:
36
 *
37
 * See the file "grammar.c" for more information.
38
 *
39
 *** Change Log:
40
 * $Log: grammar.h,v $
41
 * Revision 1.1.1.1  1998/01/17  15:57:46  release
42
 * First version to be checked into rolling release.
43
 *
44
 * Revision 1.2  1994/12/15  09:58:15  smf
45
 * Brought into line with OSSG C Coding Standards Document, as per
46
 * "CR94_178.sid+tld-update".
47
 *
48
 * Revision 1.1.1.1  1994/07/25  16:04:34  smf
49
 * Initial import of SID 1.8 non shared files.
50
 *
51
**/
52
 
53
/****************************************************************************/
54
 
55
#ifndef H_GRAMMAR
56
#define H_GRAMMAR
57
 
58
#include "os-interface.h"
59
#include "entry.h"
60
#include "entry-list.h"
61
#include "ostream.h"
62
#include "table.h"
63
#include "types.h"
64
 
65
/*--------------------------------------------------------------------------*/
66
 
67
typedef struct GrammarT {
68
    TableT			table;
69
    EntryListT			entry_list;
70
    unsigned			terminal;
71
    EntryP			predicate_type;
72
    EntryP			predicate_id;
73
} GrammarT, *GrammarP;
74
 
75
/*--------------------------------------------------------------------------*/
76
 
77
extern void			grammar_init
78
	PROTO_S ((GrammarP));
79
extern TableP			grammar_table
80
	PROTO_S ((GrammarP));
81
extern EntryListP		grammar_entry_list
82
	PROTO_S ((GrammarP));
83
extern unsigned			grammar_max_terminal
84
	PROTO_S ((GrammarP));
85
extern unsigned			grammar_next_terminal
86
	PROTO_S ((GrammarP));
87
extern EntryP			grammar_get_predicate_type
88
	PROTO_S ((GrammarP));
89
extern void			grammar_set_predicate_type
90
	PROTO_S ((GrammarP, EntryP));
91
extern EntryP			grammar_get_predicate_id
92
	PROTO_S ((GrammarP));
93
extern void			grammar_check_complete
94
	PROTO_S ((GrammarP));
95
extern void			grammar_remove_left_recursion
96
	PROTO_S ((GrammarP));
97
extern void			grammar_compute_first_sets
98
	PROTO_S ((GrammarP));
99
extern void			grammar_factor
100
	PROTO_S ((GrammarP));
101
extern void			grammar_simplify
102
	PROTO_S ((GrammarP));
103
extern void			grammar_compute_inlining
104
	PROTO_S ((GrammarP));
105
extern void			grammar_check_collisions
106
	PROTO_S ((GrammarP));
107
extern void			grammar_recompute_alt_names
108
	PROTO_S ((GrammarP));
109
extern void			grammar_compute_mutations
110
	PROTO_S ((GrammarP));
111
 
112
extern void			write_grammar
113
	PROTO_S ((OStreamP, GrammarP));
114
 
115
/*--------------------------------------------------------------------------*/
116
 
117
#ifdef FS_FAST
118
#define grammar_table(g) (&((g)->table))
119
#define grammar_entry_list(g) (&((g)->entry_list))
120
#define grammar_max_terminal(g) ((g)->terminal)
121
#define grammar_get_predicate_type(g) ((g)->predicate_type)
122
#define grammar_set_predicate_type(g, t) ((g)->predicate_type = (t))
123
#define grammar_get_predicate_id(g) ((g)->predicate_id)
124
#endif /* defined (FS_FAST) */
125
 
126
#endif /* !defined (H_GRAMMAR) */
127
 
128
/*
129
 * Local variables(smf):
130
 * eval: (include::add-path-entry "../os-interface" "../library")
131
 * eval: (include::add-path-entry "../generated")
132
 * end:
133
**/