Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] Diff of /sml/trunk/src/smlnj-lib/PP/src/pp-stream-fn.sml
ViewVC logotype

Diff of /sml/trunk/src/smlnj-lib/PP/src/pp-stream-fn.sml

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

revision 1333, Thu May 22 17:12:13 2003 UTC revision 1334, Thu May 22 22:46:30 2003 UTC
# Line 311  Line 311 
311    (* Set the size of the element on the top of the scan stack.  The isBreak    (* Set the size of the element on the top of the scan stack.  The isBreak
312     * flag is set to true for breaks and false for boxes.     * flag is set to true for breaks and false for boxes.
313     *)     *)
314      fun setSize (strm, isBreak) = let      fun setSize (strm, isBreak) =
315          (* NOTE: scanStk should never be empty *)          (* NOTE: scanStk should never be empty *)
316            val PP{leftTot, rightTot, scanStk as ref((leftTot', elem)::r), ...} = strm          case strm of
317            in              PP { scanStk as ref [], ... } =>
318                  raise Fail "PPStreamFn:setSize: impossible: scanStk is empty"
319              | PP{leftTot, rightTot, scanStk as ref((leftTot', elem)::r), ...} =>
320            (* check for obsolete elements *)            (* check for obsolete elements *)
321              if (leftTot' < !leftTot)              if (leftTot' < !leftTot)
322                then clearScanStk strm                then clearScanStk strm
# Line 327  Line 329 
329                        scanStk := r)                        scanStk := r)
330                    | _ => ()                    | _ => ()
331                  (* end case *))                  (* end case *))
           end  
332    
333      fun pushScanElem (strm as PP{scanStk, rightTot, ...}, setSz, tok) = (      fun pushScanElem (strm as PP{scanStk, rightTot, ...}, setSz, tok) = (
334            enqueueTok (strm, tok);            enqueueTok (strm, tok);

Legend:
Removed from v.1333  
changed lines
  Added in v.1334

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0