<- Back to shtanton's homepage
aboutsummaryrefslogtreecommitdiff
path: root/subex/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'subex/main.go')
-rw-r--r--subex/main.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/subex/main.go b/subex/main.go
index 091625b..9824f10 100644
--- a/subex/main.go
+++ b/subex/main.go
@@ -131,7 +131,12 @@ func Main() {
panic("Expected: program [subex]")
}
program := os.Args[1]
- ast := Parse(program)
+ reader := &StringRuneReader {
+ input: program,
+ pos: 0,
+ width: 0,
+ }
+ ast := Parse(reader)
transducer := CompileTransducer(ast)
stdin := bufio.NewReader(os.Stdin);