<- Back to shtanton's homepage
aboutsummaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
Diffstat (limited to 'main')
-rw-r--r--main/main.go9
1 files changed, 5 insertions, 4 deletions
diff --git a/main/main.go b/main/main.go
index 08514ab..3a701ed 100644
--- a/main/main.go
+++ b/main/main.go
@@ -6,6 +6,7 @@ import (
"fmt"
"strings"
"unicode/utf8"
+ "main/subex"
)
type PathSegment interface {}
@@ -619,13 +620,13 @@ func runTransducer(transducer TransducerState, input string) (output string, err
func main() {
if len(os.Args) != 3 {
- panic("Expected: program [input] [subex]")
+ panic("Expected: stred [input] [subex]")
}
input := os.Args[1]
program := os.Args[2]
- ast := parse(program)
- transducer := compileTransducer(ast)
- output, err := runTransducer(transducer, input)
+ ast := subex.Parse(program)
+ transducer := subex.CompileTransducer(ast)
+ output, err := subex.RunTransducer(transducer, input)
if err {
output = input
}