]> andersk Git - splint.git/blame - src/Headers/mttok.h
*** empty log message ***
[splint.git] / src / Headers / mttok.h
CommitLineData
28bf4b0b 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
13struct s_mttok
14{
15 int tok;
16 cstring text;
17 fileloc loc;
18} ;
19
20/* in forwardTypes.h: abst_typedef struct _mttok *mttok; */
21
22extern mttok mttok_create (int p_tok,
23 /*@only@*/ cstring p_text,
24 /*@only@*/ fileloc p_loc) /*@modifies nothing@*/ ;
25extern /*@only@*/ cstring mttok_unparse (mttok p_tok) /*@*/ ;
26
27extern void mttok_free (/*@only@*/ mttok p_t) ;
28
29extern int mttok_getTok (mttok p_t) /*@*/ ;
30# define mttok_getTok(t) ((t)->tok)
31
32extern /*@dependent@*/ /*@exposed@*/ fileloc mttok_getLoc (mttok p_t) /*@*/ ;
33# define mttok_getLoc(t) ((t)->loc)
34
35extern /*@only@*/ fileloc mttok_stealLoc (mttok p_t) /*@modifies p_t@*/ ;
36
37extern /*@only@*/ cstring mttok_getText (mttok p_t) /*@*/ ;
38# define mttok_getText(t) (cstring_copy ((t)->text))
39
40extern /*@observer@*/ cstring mttok_observeText (mttok p_t) /*@*/ ;
41# define mttok_observeText(t) ((t)->text)
42
43extern bool mttok_isIdentifier (mttok p_t) /*@*/ ;
b072092f 44extern bool mttok_isError (mttok p_t) /*@*/ ;
28bf4b0b 45
46# else
47# error "Multiple include"
48# endif
This page took 0.084173 seconds and 5 git commands to generate.