summaryrefslogtreecommitdiff
path: root/cmd/pgset/main.go
blob: 8d32fbe975618b78af2ca972931ac38eda4d3776 (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
25
26
27
28
29
30
package main

import (
	"os"
	"io"
	"log"
	"strings"
	"pgset/lib/parse"
)

func main() {
	// Ingest
	in, err := io.ReadAll(os.Stdin)
	if err != nil {
		log.Fatal(err)
	}

	// Read from the string in memory a character at a time.
	// The state holding the place in the input is passed around
	// with the Reader.
	r := strings.NewReader(string(in))

	_, err = parse.Parse(r)
	if err != nil {
		log.Fatal(err)
	}
	//neatroff(tree)
	//tex(tree)
	//sile(tree)
}