1
2 (* The type of tokens. *)
3
4 type token =
5 | WITH
6 | WHILE
7 | WHEN
8 | VIRTUAL
9 | VAL
10 | UNDERSCORE
11 | UIDENT of (string)
12 | TYPE
13 | TRY
14 | TRUE
15 | TO
16 | TILDE
17 | THEN
18 | STRUCT
19 | STRING of (string * string option)
20 | STAR
21 | SIG
22 | SEMISEMI
23 | SEMI
24 | RPAREN
25 | REC
26 | RBRACKET
27 | RBRACE
28 | QUOTE
29 | QUESTION
30 | PRIVATE
31 | PREFIXOP of (string)
32 | PLUSEQ
33 | PLUSDOT
34 | PLUS
35 | PERCENT
36 | OR
37 | OPTLABEL of (string)
38 | OPEN
39 | OF
40 | OBJECT
41 | NONREC
42 | NEW
43 | MUTABLE
44 | MODULE
45 | MINUSGREATER
46 | MINUSDOT
47 | MINUS
48 | METHOD
49 | MATCH
50 | LPAREN
51 | LIDENT of (string)
52 | LETOP of (string)
53 | LET
54 | LESSMINUS
55 | LESS
56 | LBRACKETPERCENTPERCENT
57 | LBRACKETPERCENT
58 | LBRACKETLESS
59 | LBRACKETGREATER
60 | LBRACKETBAR
61 | LBRACKETATATAT
62 | LBRACKETATAT
63 | LBRACKETAT
64 | LBRACKET
65 | LBRACELESS
66 | LBRACE
67 | LAZY
68 | LABEL of (string)
69 | INT of (string * char option)
70 | INITIALIZER
71 | INHERIT
72 | INFIXOP4 of (string)
73 | INFIXOP3 of (string)
74 | INFIXOP2 of (string)
75 | INFIXOP1 of (string)
76 | INFIXOP0 of (string)
77 | INCLUDE
78 | IN
79 | IF
80 | HASHOP of (string)
81 | HASH
82 | GREATERRBRACKET
83 | GREATERRBRACE
84 | GREATER
85 | FUNCTOR
86 | FUNCTION
87 | FUN
88 | FOR
89 | FLOAT of (string * char option)
90 | FALSE
91 | EXTERNAL
92 | EXCEPTION
93 | EQUAL
94 | EOL
95 | EOF
96 | END
97 | ELSE
98 | DOWNTO
99 | DOTOP of (string)
100 | DOTDOT
101 | DOT
102 | DONE
103 | DOCSTRING of (Docstrings.docstring)
104 | DO
105 | CONSTRAINT
106 | COMMENT of (string * Location.t)
107 | COMMA
108 | COLONGREATER
109 | COLONEQUAL
110 | COLONCOLON
111 | COLON
112 | CLASS
113 | CHAR of (char)
114 | BEGIN
115 | BARRBRACKET
116 | BARBAR
117 | BAR
118 | BANG
119 | BACKQUOTE
120 | ASSERT
121 | AS
122 | ANDOP of (string)
123 | AND
124 | AMPERSAND
125 | AMPERAMPER
126
127 (* This exception is raised by the monolithic API functions. *)
128
129 exception Error
130
131 (* The monolithic API. *)
132
133 val use_file: (Lexing.lexbuf -> token) -> Lexing.lexbuf -> (Parsetree.toplevel_phrase list)
134
135 val toplevel_phrase: (Lexing.lexbuf -> token) -> Lexing.lexbuf -> (Parsetree.toplevel_phrase)
136
137 val parse_pattern: (Lexing.lexbuf -> token) -> Lexing.lexbuf -> (Parsetree.pattern)
138
139 val parse_expression: (Lexing.lexbuf -> token) -> Lexing.lexbuf -> (Parsetree.expression)
140
141 val parse_core_type: (Lexing.lexbuf -> token) -> Lexing.lexbuf -> (Parsetree.core_type)
142
143 val interface: (Lexing.lexbuf -> token) -> Lexing.lexbuf -> (Parsetree.signature)
144
145 val implementation: (Lexing.lexbuf -> token) -> Lexing.lexbuf -> (Parsetree.structure)
146
147 module MenhirInterpreter : sig
148
149 (* The incremental API. *)
150
151 include MenhirLib.IncrementalEngine.INCREMENTAL_ENGINE
152 with type token = token
153
154 end
155
156 (* The entry point(s) to the incremental API. *)
157
158 module Incremental : sig
159
160 val use_file: Lexing.position -> (Parsetree.toplevel_phrase list) MenhirInterpreter.checkpoint
161
162 val toplevel_phrase: Lexing.position -> (Parsetree.toplevel_phrase) MenhirInterpreter.checkpoint
163
164 val parse_pattern: Lexing.position -> (Parsetree.pattern) MenhirInterpreter.checkpoint
165
166 val parse_expression: Lexing.position -> (Parsetree.expression) MenhirInterpreter.checkpoint
167
168 val parse_core_type: Lexing.position -> (Parsetree.core_type) MenhirInterpreter.checkpoint
169
170 val interface: Lexing.position -> (Parsetree.signature) MenhirInterpreter.checkpoint
171
172 val implementation: Lexing.position -> (Parsetree.structure) MenhirInterpreter.checkpoint
173
174 end
175