Subversion Repositories tendra.SVN

Rev

Rev 2 | Go to most recent revision | Details | Compare with Previous | 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
/*** basic.h --- Basic ADT.
32
 *
33
 ** Author: Steve Folkes <smf@hermes.mod.uk>
34
 *
35
 *** Commentary:
36
 *
37
 * See the file "basic.c" for more information.
38
 *
39
 *** Change Log:
40
 * $Log: basic.h,v $
41
 * Revision 1.1.1.1  1998/01/17  15:57:45  release
42
 * First version to be checked into rolling release.
43
 *
44
 * Revision 1.2  1994/12/15  09:58:02  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:32  smf
49
 * Initial import of SID 1.8 non shared files.
50
 *
51
**/
52
 
53
/****************************************************************************/
54
 
55
#ifndef H_BASIC
56
#define H_BASIC
57
 
58
#include "os-interface.h"
59
#include "bitvec.h"
60
#include "dalloc.h"
61
#include "dstring.h"
62
#include "entry.h"
63
#include "grammar.h"
64
#include "ostream.h"
65
#include "types.h"
66
 
67
/*--------------------------------------------------------------------------*/
68
 
69
typedef struct BasicT {
70
    unsigned			terminal;
71
    TypeTupleT			result;
72
    GenericP			result_code;
73
    BoolT			ignored;
74
} BasicT, *BasicP;
75
 
76
typedef struct BasicClosureT {
77
    BitVecP			bitvec;
78
    GrammarP			grammar;
79
} BasicClosureT, *BasicClosureP;
80
 
81
/*--------------------------------------------------------------------------*/
82
 
83
extern BasicP			basic_create
84
	PROTO_S ((GrammarP, BoolT));
85
extern unsigned			basic_terminal
86
	PROTO_S ((BasicP));
87
extern TypeTupleP		basic_result
88
	PROTO_S ((BasicP));
89
extern GenericP			basic_get_result_code
90
	PROTO_S ((BasicP));
91
extern void			basic_set_result_code
92
	PROTO_S ((BasicP, GenericP));
93
extern BoolT			basic_get_ignored
94
	PROTO_S ((BasicP));
95
extern void			basic_iter_for_table
96
	PROTO_S ((BasicP, BoolT, void (*) (EntryP, GenericP), GenericP));
97
 
98
extern void			write_basics
99
	PROTO_S ((OStreamP, BasicClosureP));
100
 
101
/*--------------------------------------------------------------------------*/
102
 
103
#ifdef FS_FAST
104
#define basic_terminal(b) ((b)->terminal)
105
#define basic_result(b) (&((b)->result))
106
#define basic_get_result_code(b) ((b)->result_code)
107
#define basic_set_result_code(b, c) ((b)->result_code = (c))
108
#define basic_get_ignored(b) ((b)->ignored)
109
#endif /* defined (FS_FAST) */
110
 
111
#endif /* !defined (H_BASIC) */
112
 
113
/*
114
 * Local variables(smf):
115
 * eval: (include::add-path-entry "../os-interface" "../library")
116
 * eval: (include::add-path-entry "../generated")
117
 * end:
118
**/