Release coccinelle-0.1.2
[bpt/coccinelle.git] / parsing_c / lexer_parser.mli
CommitLineData
34e49164
C
1
2val _handle_typedef : bool ref
3
4val enable_typedef : unit -> unit
5val disable_typedef : unit -> unit
6val is_enabled_typedef : unit -> bool
7
8
9
10(* private *)
11type identkind = TypeDefI | IdentI
12val _typedef : (string, identkind) Common.scoped_h_env ref
13
14val add_ident : string -> unit
15val add_typedef : string -> unit
16val add_typedef_root : string -> unit
17
18val new_scope : unit -> unit
19val del_scope : unit -> unit
20
21val is_typedef : string -> bool
22
23val lexer_reset_typedef : unit -> unit
24
25val _old_state : (string, identkind) Common.scoped_h_env ref
26val save_typedef_state : unit -> unit
27val restore_typedef_state : unit -> unit
28
29
485bce71
C
30type context =
31 | InTopLevel
32 | InFunction
33 | InStruct
34 | InParameter
35 | InInitializer
36 | InEnum
37
38val is_top_or_struct : context -> bool
39
34e49164 40type lexer_hint = {
485bce71
C
41 mutable context_stack: context Common.stack;
42 }
34e49164
C
43
44val _lexer_hint : lexer_hint ref
485bce71
C
45val current_context: unit -> context
46val push_context: context -> unit
47val pop_context: unit -> unit
34e49164
C
48
49val default_hint : unit -> lexer_hint