mk/mk.go

25 lines
332 B
Go
Raw Normal View History

2013-02-25 21:25:25 -08:00
package main
import (
"fmt"
"os"
"io/ioutil"
)
func main() {
input, _ := ioutil.ReadAll(os.Stdin)
l, tokens := lex(string(input))
for t := range tokens {
if t.typ == tokenError {
fmt.Printf("Error: %s", l.errmsg)
break
}
fmt.Println(t.String())
}
}