Sketching out the parser.

This commit is contained in:
Daniel Jones 2013-02-25 23:52:08 -08:00
parent 9ba796161d
commit d129ff285c
5 changed files with 258 additions and 18 deletions

14
mk.go
View file

@ -2,23 +2,9 @@
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())
}
}