summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
Diffstat (limited to 'cmd')
-rw-r--r--cmd/pgset/main.go30
1 files changed, 30 insertions, 0 deletions
diff --git a/cmd/pgset/main.go b/cmd/pgset/main.go
new file mode 100644
index 0000000..8d32fbe
--- /dev/null
+++ b/cmd/pgset/main.go
@@ -0,0 +1,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)
+}