/[mojave]/metaprl/refiner/reflib/dform.ml
ViewVC logotype

Diff of /metaprl/refiner/reflib/dform.ml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 3583 by nogin, Sun Jun 24 10:25:49 2001 UTC revision 3584 by nogin, Thu Apr 25 15:28:40 2002 UTC
# Line 57  Line 57 
57          debug_value = false          debug_value = false
58        }        }
59    
60    let debug_dform_depth =
61       create_debug (**)
62          { debug_name = "dform_depth";
63            debug_description = "check zone depth to catch unballanced buffers";
64            debug_value = false
65          }
66    
67  (************************************************************************  (************************************************************************
68   * TYPES                                                                *   * TYPES                                                                *
69   ************************************************************************)   ************************************************************************)
# Line 190  Line 197 
197  (*  (*
198   * Commands in initial base.   * Commands in initial base.
199   *)   *)
200  let lzone { dform_buffer = buf } =  let lzone df = format_lzone df.dform_buffer
201     format_lzone buf  let hzone df = format_hzone df.dform_buffer
202    let szone df = format_szone df.dform_buffer
203  let hzone { dform_buffer = buf } =  let izone df = format_izone df.dform_buffer
204     format_hzone buf  let ezone df = format_ezone df.dform_buffer
   
 let szone { dform_buffer = buf } =  
    format_szone buf  
   
 let izone { dform_buffer = buf } =  
    format_izone buf  
   
 let ezone { dform_buffer = buf } =  
    format_ezone buf  
205    
206  let hbreak = function  let hbreak = function
207     { dform_items = [RewriteString yes; RewriteString no]; dform_buffer = buf } ->     { dform_items = [RewriteString yes; RewriteString no]; dform_buffer = buf } ->
# Line 220  Line 218 
218        format_cbreak buf yes no        format_cbreak buf yes no
219   | _ -> raise (Invalid_argument "Dform.sbreak")   | _ -> raise (Invalid_argument "Dform.sbreak")
220    
221  let space { dform_buffer = buf } =  let space df = format_space df.dform_buffer
222     format_space buf  let hspace df = format_hspace df.dform_buffer
223    let newline df = format_newline df.dform_buffer
 let hspace { dform_buffer = buf } =  
    format_hspace buf  
   
 let newline { dform_buffer = buf } =  
    format_newline buf  
224    
225  let pushm = function  let pushm = function
226     { dform_items = [RewriteNum n]; dform_buffer = buf } ->     { dform_items = [RewriteNum n]; dform_buffer = buf } ->
# Line 238  Line 231 
231        format_pushm buf 0        format_pushm buf 0
232   | _ -> raise (Invalid_argument "Dform.pushm")   | _ -> raise (Invalid_argument "Dform.pushm")
233    
234  let popm { dform_buffer = buf } =  let popm df = format_popm df.dform_buffer
235     format_popm buf  let pushfont _ = ()
236    let popfont _ = ()
 let pushfont _ =  
    ()  
   
 let popfont _ =  
    ()  
237    
238  (************************************************************************  (************************************************************************
239   * FORMATTERS                                                           *   * FORMATTERS                                                           *
# Line 593  Line 581 
581      | _ ->      | _ ->
582           raise (Invalid_argument "slot")           raise (Invalid_argument "slot")
583    
584    let slot df =
585       if !debug_dform_depth then
586          let depth = zone_depth df.dform_buffer in begin
587             slot df;
588             if depth != zone_depth df.dform_buffer then
589                let str = line_format default_width ( fun buf -> slot {df with dform_buffer = buf } )
590                in eprintf "Unballanced display form: %s%t" str eflush
591          end
592       else slot df
593    
594  (*  (*
595   * Install initial commands.   * Install initial commands.
596   *)   *)

Legend:
Removed from v.3583  
changed lines
  Added in v.3584

  ViewVC Help
Powered by ViewVC 1.1.26