Annotation of researchv10no/cmd/sml/lib/mlyacc/sample.sml, revision 1.1.1.1

1.1       root        1: structure Sample =
                      2:    struct
                      3:       val run = fn filename =>
                      4:           let val in_str = open_in filename
                      5:              val lexer =  Mlex.makeLexer (input in_str)
                      6:              val p = (Calc.HDR.lineno := 0;
                      7:                       Calc.parse lexer (5,5))
                      8:           in (close_in in_str; p)
                      9:           end
                     10:     
                     11:       fun run_std_in () =
                     12:            (* more suitable for interactive use *)
                     13:        let val lexer = Mlex.makeLexer (fn _ => input_line std_in)
                     14:            val p = (Calc.HDR.lineno := 0;
                     15:                       Calc.parse lexer (0,0))
                     16:         in p
                     17:         end
                     18:    end

unix.superglobalmegacorp.com

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