]> andersk Git - splint.git/blob - src/Headers/mtContextNode.h
Updated copyrights
[splint.git] / src / Headers / mtContextNode.h
1 /*
2 ** Copyright (C) University of Virginia, Massachusetts Institue of Technology 1994-2003.
3 ** See ../LICENSE for license information.
4 **
5 */
6 /*
7 ** mtContextNode.h
8 */
9
10 # ifndef MTCONTEXTNODE_H
11 # define MTCONTEXTNODE_H
12
13 typedef enum
14 {
15   MTC_ANY = 0, MTC_PARAM, MTC_RESULT, MTC_REFERENCE, MTC_CLAUSE, MTC_LITERAL, MTC_NULL
16 } mtContextKind ;
17
18 /*@constant int MTC_NUMCONTEXTS@*/
19 /*@+enumint@*/
20 # define MTC_NUMCONTEXTS (MTC_NULL + 1)
21 /*@=enumint@*/
22
23 struct s_mtContextNode {
24   mtContextKind context;
25   ctype type; /* This state only applies to types matching. */
26 } ;
27
28 /*@constant null mtContextNode mtContextNode_undefined@*/
29 # define mtContextNode_undefined ((mtContextNode) 0)
30
31 extern /*@falsewhennull@*/ bool mtContextNode_isDefined (mtContextNode p_s) /*@*/ ;
32 # define mtContextNode_isDefined(s) ((s) != mtContextNode_undefined)
33
34 extern cstring mtContextNode_unparse (mtContextNode) /*@*/ ;
35
36 extern mtContextNode mtContextNode_createAny (void) /*@*/ ;
37 extern mtContextNode mtContextNode_createParameter (ctype) /*@*/ ;
38 extern mtContextNode mtContextNode_createReference (ctype) /*@*/ ;
39 extern mtContextNode mtContextNode_createResult (ctype) /*@*/ ;
40 extern mtContextNode mtContextNode_createClause (ctype) /*@*/ ;
41 extern mtContextNode mtContextNode_createNull (ctype) /*@*/ ;
42 extern mtContextNode mtContextNode_createLiteral (ctype) /*@*/ ;
43
44 extern void mtContextNode_free (/*@only@*/ mtContextNode) ;
45
46 extern bool mtContextNode_isReference (mtContextNode) /*@*/;
47 extern bool mtContextNode_isResult (mtContextNode) /*@*/;
48 extern bool mtContextNode_isParameter (mtContextNode) /*@*/;
49 extern bool mtContextNode_isClause (mtContextNode) /*@*/;
50 extern bool mtContextNode_isLiteral (mtContextNode) /*@*/;
51 extern bool mtContextNode_isNull (mtContextNode) /*@*/;
52
53 extern bool mtContextNode_matchesEntry (mtContextNode, uentry) /*@*/ ;
54 extern bool mtContextNode_matchesRef (mtContextNode, sRef) /*@*/ ;
55
56 extern bool mtContextNode_matchesRefStrict (mtContextNode, sRef) /*@*/ ;
57    /* Doesn't allow matches with unknown type. */
58
59 extern void mtContextNode_showRefError (mtContextNode, sRef) ;
60
61 # else
62 # error "Multiple include"
63 # endif
This page took 0.038391 seconds and 5 git commands to generate.