Work on string expansion.

This commit is contained in:
Daniel Jones 2013-02-26 22:41:25 -08:00
parent 6da2555966
commit 084a45fc74
5 changed files with 208 additions and 69 deletions

24
mk.go
View file

@ -1,13 +1,25 @@
package main
import (
"fmt"
"io/ioutil"
"os"
//"fmt"
//"io/ioutil"
//"os"
)
func main() {
input, _ := ioutil.ReadAll(os.Stdin)
rs := parse(string(input), "<stdin>")
fmt.Println(rs)
//input, _ := ioutil.ReadAll(os.Stdin)
// TEST LEXING
//_, tokens := lex(string(input))
//for t := range tokens {
//fmt.Printf("%s %s\n", t.typ, t.val)
//}
// TEST PARSING
//rs := parse(string(input), "<stdin>")
//fmt.Println(rs)
// TEST STRING EXPANSION
rules := &ruleSet{make(map[string][]string), make([]rule, 0)}
println(rules.expand("\"This is a quote: \\\"\""))
}