Some more work on string expansion.
This commit is contained in:
parent
084a45fc74
commit
f812efe3ad
4 changed files with 90 additions and 35 deletions
16
mk.go
16
mk.go
|
|
@ -1,13 +1,13 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
//"fmt"
|
||||
//"io/ioutil"
|
||||
//"os"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
)
|
||||
|
||||
func main() {
|
||||
//input, _ := ioutil.ReadAll(os.Stdin)
|
||||
input, _ := ioutil.ReadAll(os.Stdin)
|
||||
|
||||
// TEST LEXING
|
||||
//_, tokens := lex(string(input))
|
||||
|
|
@ -16,10 +16,10 @@ func main() {
|
|||
//}
|
||||
|
||||
// TEST PARSING
|
||||
//rs := parse(string(input), "<stdin>")
|
||||
//fmt.Println(rs)
|
||||
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: \\\"\""))
|
||||
//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