blob: 8edd1299188eaf2e9f9c27f89facf057f91c81d9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
package main
import "fmt"
import "tparse"
import "flag"
import "os"
func main() {
inputFile := flag.String("in", "", "The file to parse")
outputFile := flag.String("out", "out.tnp", "The file to store the parse in")
flag.Parse()
fd, err := os.Create(*outputFile)
if err != nil {
fmt.Println(err.Error())
return
}
fd.WriteString(fmt.Sprint(tparse.TokenizeFile(*inputFile)))
fd.Close()
}
|