# LL(1) # # Line length # # Thomas R. Hicks # # Last modified 6/16/83 # procedure main(a) local arg, inpt if *a = 0 then doll(&input,"standard input") else every arg := !a do { if arg == "-" then { inpt := &input arg := "standard input" } else if not (inpt := open(arg)) then { write(&errout,"Cannot open ",arg) next } doll(inpt,arg) } end procedure doll(ifd,name) local line, long, short, tab, x tab := "\t" long := 0 while line := read(ifd) do { x := *line /short := x short >:= x long <:= x } write(right(\short,6),tab,right(\long,6),tab,\name) end