5 force_newline
(); print_string
" "; open_box
0
8 close_box
(); force_newline
()
10 (* --------------------------------------------------------------------- *)
12 let rec print_sequence = function
13 Past.Seq
(e
,seq
) -> print_element e
; force_newline
(); print_sequence seq
15 | Past.SExists
((_
,v
),seq
) -> print_string
"exists "; print_string v
;
16 print_string
" ."; force_newline
(); print_sequence seq
18 and print_element
= function
19 Past.Term
(term
) -> Pretty_print_cocci.rule_elem
"" term
20 | Past.Or
(seq1
,seq2
) ->
21 force_newline
(); print_string
"("; force_newline
(); print_sequence seq1
;
22 print_string
"|"; force_newline
(); print_sequence seq2
; print_string
")"
23 | Past.DInfo
(dots
,bef
,aft
) ->
26 (function b
-> print_string
">>>"; print_element b
; force_newline
())
30 (function b
-> force_newline
(); print_string
"<<<"; print_element b
)
33 | Past.EExists
((_
,v
),elem
) -> print_string
"exists "; print_string v
;
34 print_string
" ."; force_newline
(); print_element elem
36 and print_dots
= function
37 Past.Dots
-> print_string
"..."
38 | Past.Nest
(seq
)-> print_string
"<..."; start_block(); print_sequence seq
;
39 end_block(); print_string
"...>"
40 | Past.When
(dots
,seq
) -> print_dots dots
; print_string
" when != ";
41 open_box
0; print_sequence seq
; close_box
()
42 | Past.DExists
((_
,v
),dots
) -> print_string
"exists "; print_string v
;
43 print_string
" ."; force_newline
(); print_dots dots
45 (* --------------------------------------------------------------------- *)
47 let pretty_print_e e
=