package mlpost

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Source file xdot_parser.ml

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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
type token =
  | IDENT of (string)
  | STRING of (string)
  | INT of (int)
  | FLOAT of (float)
  | NODE of (int)
  | DIGRAPH
  | BOUNDINGBOX
  | POS
  | GRAPH
  | ARROW
  | BAR
  | COLON
  | COMMA
  | SPACE
  | SEMICOLON
  | DOT
  | EQUAL
  | LEFTPAR
  | LEFTPAR_STAR_RIGHTPAR
  | LEFTSQ
  | LRARROW
  | QUOTE
  | RIGHTPAR
  | RIGHTSQ
  | LEFTAC
  | RIGHTAC
  | UNDERSCORE
  | EOF

open Parsing;;
let _ = parse_error;;
# 2 "contrib/dot/xdot_parser.mly"

  open Xdot_ast
  open Parsing

# 39 "contrib/dot/xdot_parser.ml"
let yytransl_const = [|
  262 (* DIGRAPH *);
  263 (* BOUNDINGBOX *);
  264 (* POS *);
  265 (* GRAPH *);
  266 (* ARROW *);
  267 (* BAR *);
  268 (* COLON *);
  269 (* COMMA *);
  270 (* SPACE *);
  271 (* SEMICOLON *);
  272 (* DOT *);
  273 (* EQUAL *);
  274 (* LEFTPAR *);
  275 (* LEFTPAR_STAR_RIGHTPAR *);
  276 (* LEFTSQ *);
  277 (* LRARROW *);
  278 (* QUOTE *);
  279 (* RIGHTPAR *);
  280 (* RIGHTSQ *);
  281 (* LEFTAC *);
  282 (* RIGHTAC *);
  283 (* UNDERSCORE *);
    0 (* EOF *);
    0|]

let yytransl_block = [|
  257 (* IDENT *);
  258 (* STRING *);
  259 (* INT *);
  260 (* FLOAT *);
  261 (* NODE *);
    0|]

let yylhs = "\255\255\
\001\000\005\000\005\000\006\000\006\000\006\000\006\000\007\000\
\007\000\008\000\008\000\008\000\004\000\009\000\002\000\002\000\
\003\000\000\000\000\000\000\000\000\000"

let yylen = "\002\000\
\006\000\000\000\003\000\004\000\004\000\004\000\006\000\001\000\
\003\000\003\000\003\000\003\000\002\000\003\000\002\000\003\000\
\003\000\002\000\002\000\002\000\002\000"

let yydefred = "\000\000\
\000\000\000\000\000\000\000\000\000\000\000\000\018\000\000\000\
\019\000\000\000\020\000\000\000\021\000\000\000\000\000\000\000\
\000\000\015\000\000\000\013\000\000\000\014\000\016\000\017\000\
\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\000\000\001\000\003\000\000\000\004\000\000\000\000\000\006\000\
\005\000\011\000\010\000\012\000\009\000\000\000\007\000"

let yydgoto = "\005\000\
\007\000\009\000\011\000\013\000\028\000\029\000\037\000\038\000\
\010\000"

let yysindex = "\012\000\
\001\255\005\255\005\255\005\255\000\000\010\255\000\000\004\255\
\000\000\001\000\000\000\012\255\000\000\023\000\002\255\022\255\
\005\255\000\000\005\255\000\000\003\255\000\000\000\000\000\000\
\008\255\246\254\009\255\006\255\015\255\030\255\028\255\030\255\
\030\255\034\000\003\255\018\255\013\255\023\255\019\255\014\255\
\016\255\000\000\000\000\020\255\000\000\030\255\030\255\000\000\
\000\000\000\000\000\000\000\000\000\000\017\255\000\000"

let yyrindex = "\000\000\
\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\000\000\000\000\000\000\000\000\021\255\000\000\000\000\000\000\
\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\000\000\000\000\021\255\000\000\000\000\024\255\000\000\000\000\
\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\000\000\000\000\000\000\000\000\000\000\000\000\000\000"

let yygindex = "\000\000\
\000\000\025\000\000\000\000\000\008\000\000\000\229\255\000\000\
\255\255"

let yytablesize = 271
let yytable = "\031\000\
\018\000\012\000\014\000\025\000\040\000\041\000\006\000\026\000\
\008\000\032\000\015\000\027\000\001\000\002\000\003\000\004\000\
\016\000\024\000\053\000\054\000\050\000\051\000\020\000\052\000\
\019\000\022\000\021\000\030\000\033\000\035\000\036\000\034\000\
\039\000\042\000\044\000\046\000\045\000\048\000\047\000\049\000\
\055\000\023\000\043\000\000\000\000\000\000\000\002\000\008\000\
\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
\000\000\000\000\000\000\000\000\000\000\000\000\017\000"

let yycheck = "\010\001\
\000\000\003\000\004\000\001\001\032\000\033\000\006\001\005\001\
\004\001\020\001\001\001\009\001\001\000\002\000\003\000\004\000\
\013\001\019\000\046\000\047\000\001\001\002\001\000\000\004\001\
\013\001\004\001\025\001\020\001\020\001\015\001\001\001\026\001\
\005\001\000\000\017\001\013\001\024\001\024\001\020\001\024\001\
\024\001\017\000\035\000\255\255\255\255\255\255\026\001\024\001\
\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\
\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\
\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\
\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\
\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\
\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\
\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\
\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\
\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\
\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\
\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\
\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\
\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\
\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\
\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\
\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\
\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\
\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\
\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\
\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\
\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\
\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\
\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\
\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\
\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\
\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\
\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\
\255\255\255\255\255\255\255\255\255\255\255\255\014\001"

let yynames_const = "\
  DIGRAPH\000\
  BOUNDINGBOX\000\
  POS\000\
  GRAPH\000\
  ARROW\000\
  BAR\000\
  COLON\000\
  COMMA\000\
  SPACE\000\
  SEMICOLON\000\
  DOT\000\
  EQUAL\000\
  LEFTPAR\000\
  LEFTPAR_STAR_RIGHTPAR\000\
  LEFTSQ\000\
  LRARROW\000\
  QUOTE\000\
  RIGHTPAR\000\
  RIGHTSQ\000\
  LEFTAC\000\
  RIGHTAC\000\
  UNDERSCORE\000\
  EOF\000\
  "

let yynames_block = "\
  IDENT\000\
  STRING\000\
  INT\000\
  FLOAT\000\
  NODE\000\
  "

let yyact = [|
  (fun _ -> failwith "parser")
; (fun __caml_parser_env ->
    let _2 = (Parsing.peek_val __caml_parser_env 4 : string) in
    let _4 = (Parsing.peek_val __caml_parser_env 2 : 'statements) in
    Obj.repr(
# 47 "contrib/dot/xdot_parser.mly"
                                              ( _4 )
# 234 "contrib/dot/xdot_parser.ml"
               : Xdot_ast.file))
; (fun __caml_parser_env ->
    Obj.repr(
# 50 "contrib/dot/xdot_parser.mly"
    ([])
# 240 "contrib/dot/xdot_parser.ml"
               : 'statements))
; (fun __caml_parser_env ->
    let _1 = (Parsing.peek_val __caml_parser_env 2 : 'statement) in
    let _3 = (Parsing.peek_val __caml_parser_env 0 : 'statements) in
    Obj.repr(
# 51 "contrib/dot/xdot_parser.mly"
                                  (_1::_3)
# 248 "contrib/dot/xdot_parser.ml"
               : 'statements))
; (fun __caml_parser_env ->
    let _1 = (Parsing.peek_val __caml_parser_env 3 : string) in
    let _3 = (Parsing.peek_val __caml_parser_env 1 : 'properties) in
    Obj.repr(
# 54 "contrib/dot/xdot_parser.mly"
                                   (None)
# 256 "contrib/dot/xdot_parser.ml"
               : 'statement))
; (fun __caml_parser_env ->
    let _3 = (Parsing.peek_val __caml_parser_env 1 : 'properties) in
    Obj.repr(
# 55 "contrib/dot/xdot_parser.mly"
                                   (Some (Graph _3))
# 263 "contrib/dot/xdot_parser.ml"
               : 'statement))
; (fun __caml_parser_env ->
    let _1 = (Parsing.peek_val __caml_parser_env 3 : int) in
    let _3 = (Parsing.peek_val __caml_parser_env 1 : 'properties) in
    Obj.repr(
# 56 "contrib/dot/xdot_parser.mly"
                                  (Some (Node (_1,_3)))
# 271 "contrib/dot/xdot_parser.ml"
               : 'statement))
; (fun __caml_parser_env ->
    let _1 = (Parsing.peek_val __caml_parser_env 5 : int) in
    let _3 = (Parsing.peek_val __caml_parser_env 3 : int) in
    let _5 = (Parsing.peek_val __caml_parser_env 1 : 'properties) in
    Obj.repr(
# 57 "contrib/dot/xdot_parser.mly"
                                             (Some (Edge (_1,_3,_5)))
# 280 "contrib/dot/xdot_parser.ml"
               : 'statement))
; (fun __caml_parser_env ->
    let _1 = (Parsing.peek_val __caml_parser_env 0 : 'property) in
    Obj.repr(
# 60 "contrib/dot/xdot_parser.mly"
            ([_1])
# 287 "contrib/dot/xdot_parser.ml"
               : 'properties))
; (fun __caml_parser_env ->
    let _1 = (Parsing.peek_val __caml_parser_env 2 : 'property) in
    let _3 = (Parsing.peek_val __caml_parser_env 0 : 'properties) in
    Obj.repr(
# 61 "contrib/dot/xdot_parser.mly"
                             (_1::_3)
# 295 "contrib/dot/xdot_parser.ml"
               : 'properties))
; (fun __caml_parser_env ->
    let _1 = (Parsing.peek_val __caml_parser_env 2 : string) in
    let _3 = (Parsing.peek_val __caml_parser_env 0 : string) in
    Obj.repr(
# 64 "contrib/dot/xdot_parser.mly"
                      ((_1,_3))
# 303 "contrib/dot/xdot_parser.ml"
               : 'property))
; (fun __caml_parser_env ->
    let _1 = (Parsing.peek_val __caml_parser_env 2 : string) in
    let _3 = (Parsing.peek_val __caml_parser_env 0 : string) in
    Obj.repr(
# 65 "contrib/dot/xdot_parser.mly"
                     ((_1,_3))
# 311 "contrib/dot/xdot_parser.ml"
               : 'property))
; (fun __caml_parser_env ->
    let _1 = (Parsing.peek_val __caml_parser_env 2 : string) in
    let _3 = (Parsing.peek_val __caml_parser_env 0 : float) in
    Obj.repr(
# 66 "contrib/dot/xdot_parser.mly"
                     ((_1,string_of_float _3))
# 319 "contrib/dot/xdot_parser.ml"
               : 'property))
; (fun __caml_parser_env ->
    let _1 = (Parsing.peek_val __caml_parser_env 1 : 'pos_bas) in
    Obj.repr(
# 70 "contrib/dot/xdot_parser.mly"
               (_1)
# 326 "contrib/dot/xdot_parser.ml"
               : Xdot_ast.point))
; (fun __caml_parser_env ->
    let _1 = (Parsing.peek_val __caml_parser_env 2 : float) in
    let _3 = (Parsing.peek_val __caml_parser_env 0 : float) in
    Obj.repr(
# 73 "contrib/dot/xdot_parser.mly"
                     ((_1,_3))
# 334 "contrib/dot/xdot_parser.ml"
               : 'pos_bas))
; (fun __caml_parser_env ->
    let _1 = (Parsing.peek_val __caml_parser_env 1 : 'pos_bas) in
    Obj.repr(
# 76 "contrib/dot/xdot_parser.mly"
               ([_1])
# 341 "contrib/dot/xdot_parser.ml"
               : Xdot_ast.path))
; (fun __caml_parser_env ->
    let _1 = (Parsing.peek_val __caml_parser_env 2 : 'pos_bas) in
    let _3 = (Parsing.peek_val __caml_parser_env 0 : Xdot_ast.path) in
    Obj.repr(
# 77 "contrib/dot/xdot_parser.mly"
                      ((_1::_3))
# 349 "contrib/dot/xdot_parser.ml"
               : Xdot_ast.path))
; (fun __caml_parser_env ->
    let _1 = (Parsing.peek_val __caml_parser_env 2 : 'pos_bas) in
    let _3 = (Parsing.peek_val __caml_parser_env 0 : 'pos_bas) in
    Obj.repr(
# 80 "contrib/dot/xdot_parser.mly"
                         ((_1,_3))
# 357 "contrib/dot/xdot_parser.ml"
               : Xdot_ast.point * Xdot_ast.point))
(* Entry file *)
; (fun __caml_parser_env -> raise (Parsing.YYexit (Parsing.peek_val __caml_parser_env 0)))
(* Entry path *)
; (fun __caml_parser_env -> raise (Parsing.YYexit (Parsing.peek_val __caml_parser_env 0)))
(* Entry bounding_box *)
; (fun __caml_parser_env -> raise (Parsing.YYexit (Parsing.peek_val __caml_parser_env 0)))
(* Entry pos *)
; (fun __caml_parser_env -> raise (Parsing.YYexit (Parsing.peek_val __caml_parser_env 0)))
|]
let yytables =
  { Parsing.actions=yyact;
    Parsing.transl_const=yytransl_const;
    Parsing.transl_block=yytransl_block;
    Parsing.lhs=yylhs;
    Parsing.len=yylen;
    Parsing.defred=yydefred;
    Parsing.dgoto=yydgoto;
    Parsing.sindex=yysindex;
    Parsing.rindex=yyrindex;
    Parsing.gindex=yygindex;
    Parsing.tablesize=yytablesize;
    Parsing.table=yytable;
    Parsing.check=yycheck;
    Parsing.error_function=parse_error;
    Parsing.names_const=yynames_const;
    Parsing.names_block=yynames_block }
let file (lexfun : Lexing.lexbuf -> token) (lexbuf : Lexing.lexbuf) =
   (Parsing.yyparse yytables 1 lexfun lexbuf : Xdot_ast.file)
let path (lexfun : Lexing.lexbuf -> token) (lexbuf : Lexing.lexbuf) =
   (Parsing.yyparse yytables 2 lexfun lexbuf : Xdot_ast.path)
let bounding_box (lexfun : Lexing.lexbuf -> token) (lexbuf : Lexing.lexbuf) =
   (Parsing.yyparse yytables 3 lexfun lexbuf : Xdot_ast.point * Xdot_ast.point)
let pos (lexfun : Lexing.lexbuf -> token) (lexbuf : Lexing.lexbuf) =
   (Parsing.yyparse yytables 4 lexfun lexbuf : Xdot_ast.point)
OCaml

Innovation. Community. Security.