]> andersk Git - splint.git/blob - src/Headers/mttok.h
122d00a834d3ca5ef3c7f04302c541f03c64ee31
[splint.git] / src / Headers / mttok.h
1 /*
2 ** Copyright (C) University of Virginia, Massachusetts Institue of Technology 1994-2001.
3 ** See ../LICENSE for license information.
4 **
5 */
6 /*
7 ** mttok.h
8 */
9
10 # ifndef MTTOK_H
11 # define MTTOK_H
12
13 struct s_mttok
14 {
15   int tok;
16   cstring text;
17   fileloc loc;
18 } ;
19
20 /* in forwardTypes.h: abst_typedef struct _mttok *mttok; */
21
22 extern mttok mttok_create  (int p_tok,
23                             /*@only@*/ cstring p_text,
24                             /*@only@*/ fileloc p_loc) /*@modifies nothing@*/ ;
25 extern /*@only@*/ cstring mttok_unparse (mttok p_tok) /*@*/ ;
26
27 extern void mttok_free (/*@only@*/ mttok p_t) ;
28
29 extern int mttok_getTok (mttok p_t) /*@*/ ;
30 # define mttok_getTok(t)   ((t)->tok)
31
32 extern /*@dependent@*/ /*@exposed@*/ fileloc mttok_getLoc (mttok p_t) /*@*/ ;
33 # define mttok_getLoc(t)   ((t)->loc)
34
35 extern /*@only@*/ fileloc mttok_stealLoc (mttok p_t) /*@modifies p_t@*/ ;
36
37 extern /*@only@*/ cstring mttok_getText (mttok p_t) /*@*/ ;
38 # define mttok_getText(t)  (cstring_copy ((t)->text))
39
40 extern /*@observer@*/ cstring mttok_observeText (mttok p_t) /*@*/ ;
41 # define mttok_observeText(t)  ((t)->text)
42
43 extern bool mttok_isIdentifier (mttok p_t) /*@*/ ;
44 extern bool mttok_isError (mttok p_t) /*@*/ ;
45
46 # else
47 # error "Multiple include"
48 # endif
This page took 0.025723 seconds and 3 git commands to generate.