Work on string expansion.
This commit is contained in:
parent
6da2555966
commit
084a45fc74
5 changed files with 208 additions and 69 deletions
24
mk.go
24
mk.go
|
|
@ -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: \\\"\""))
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue