File:  [Research Unix] / researchv10no / cmd / sml / lib / mlyacc / sample.sml
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 17:21:34 2018 UTC (8 years, 1 month ago) by root
Branches: belllabs, MAIN
CVS tags: researchv10, HEAD
researchv10 Norman

structure Sample =
   struct
      val run = fn filename =>
          let val in_str = open_in filename
	      val lexer =  Mlex.makeLexer (input in_str)
	      val p = (Calc.HDR.lineno := 0;
		       Calc.parse lexer (5,5))
	   in (close_in in_str; p)
	   end
    
      fun run_std_in () =
	    (* more suitable for interactive use *)
	let val lexer = Mlex.makeLexer (fn _ => input_line std_in)
	    val p = (Calc.HDR.lineno := 0;
		       Calc.parse lexer (0,0))
	 in p
        end
   end

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.