From fba426b3910f16c8abc6f819da3138f03e5f0b1a Mon Sep 17 00:00:00 2001 From: Charlie Stanton Date: Sun, 19 Feb 2023 08:59:16 +0000 Subject: Introduces subex processing Doesn't integrate it at all yet --- main/main.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'main') 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 } -- cgit v1.2.3