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