1Pparse(3)                        OCaml library                       Pparse(3)
2
3
4

NAME

6       Pparse  -  Driver for the parser, external preprocessors and ast plugin
7       hooks
8

Module

10       Module   Pparse
11

Documentation

13       Module Pparse
14        : sig end
15
16
17       Driver for the parser, external preprocessors and ast plugin hooks
18
19       Warning: this module is unstable and part of Compiler_libs .
20
21
22
23
24
25       type error =
26        | CannotRun of string
27        | WrongMagic of string
28
29
30
31
32
33       exception Error of error
34
35
36
37
38
39       val preprocess : string -> string
40
41
42
43
44       val remove_preprocessed : string -> unit
45
46
47
48       type 'a ast_kind =
49        | Structure : Parsetree.structure ast_kind
50        | Signature : Parsetree.signature ast_kind
51
52
53
54
55
56       val read_ast : 'a ast_kind -> string -> 'a
57
58
59
60
61       val write_ast : 'a ast_kind -> string -> 'a -> unit
62
63
64
65
66       val file : tool_name:string -> string -> (Lexing.lexbuf ->  'a)  ->  'a
67       ast_kind -> 'a
68
69
70
71
72       val  apply_rewriters : ?restore:bool -> tool_name:string -> 'a ast_kind
73       -> 'a -> 'a
74
75       If restore = true (the default), cookies set by external rewriters will
76       be kept for later calls.
77
78
79
80       val  apply_rewriters_str  : ?restore:bool -> tool_name:string -> Parse‐
81       tree.structure -> Parsetree.structure
82
83
84
85
86       val apply_rewriters_sig : ?restore:bool -> tool_name:string  ->  Parse‐
87       tree.signature -> Parsetree.signature
88
89
90
91
92       val report_error : Format.formatter -> error -> unit
93
94
95
96
97       val   parse_implementation  :  tool_name:string  ->  string  ->  Parse‐
98       tree.structure
99
100
101
102
103       val parse_interface : tool_name:string -> string -> Parsetree.signature
104
105
106
107
108       val call_external_preprocessor : string -> string -> string
109
110
111
112
113       val open_and_check_magic : string -> string -> in_channel * bool
114
115
116
117       module ImplementationHooks : sig end
118
119
120
121
122       module InterfaceHooks : sig end
123
124
125
126
127
128
129
130OCamldoc                          2019-07-30                         Pparse(3)
Impressum