File: lexer_parser.mli

package info (click to toggle)
coccinelle 1.0.8.deb-5
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 26,148 kB
  • sloc: ml: 136,392; ansic: 23,594; sh: 2,189; makefile: 2,157; perl: 1,576; lisp: 840; python: 823; awk: 70; csh: 12
file content (50 lines) | stat: -rw-r--r-- 1,136 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50

val enable_typedef  : unit -> unit
val disable_typedef : unit -> unit
val is_enabled_typedef : unit -> bool

val is_kr_possible : unit -> bool
val kr_impossible : unit -> unit

(* private *)
type identkind = TypeDefI | IdentI
val _typedef : (string, identkind) Common.scoped_h_env ref

val add_ident   : string -> unit
val add_typedef : string -> unit

val add_typedef_root : string -> Ast_c.info -> unit

val new_scope : unit -> unit
val del_scope : unit -> unit

val is_typedef : string -> bool

val lexer_reset_typedef :
    (string, identkind) Common.scoped_h_env option (* known typedefs *) -> unit

val _old_state : (string, identkind) Common.scoped_h_env ref
val save_typedef_state : unit -> unit
val restore_typedef_state : unit -> unit


type context =
  | InTopLevel
  | InFunction
  | InStruct
  | InParameter
  | InInitializer
  | InEnum

type lexer_hint = {
  mutable context_stack: context Common.stack;
 }

val _lexer_hint : lexer_hint ref
val current_context: unit -> context
val push_context: context -> unit
val pop_context: unit -> unit

val default_hint : unit -> lexer_hint

val is_top_or_struct : context -> bool