Skip to content

Commit

Permalink
Merge pull request #72 from corywalker/fix_install
Browse files Browse the repository at this point in the history
Attempt at fixing install.
  • Loading branch information
corywalker committed Jul 26, 2017
2 parents a2cab65 + f45e9af commit 729156a
Show file tree
Hide file tree
Showing 10 changed files with 8 additions and 22 deletions.
8 changes: 0 additions & 8 deletions .travis.yml
Expand Up @@ -7,13 +7,5 @@ go:

go_import_path: github.com/corywalker/expreduce

install:
- go get -d ./...
- go get golang.org/x/tools/cmd/goyacc
- go get github.com/cznic/golex
- go get -u github.com/jteeuwen/go-bindata/...
- go generate ./...
- go get ./...

script:
- go test -v ./...
1 change: 0 additions & 1 deletion example/complicated.txt

This file was deleted.

4 changes: 0 additions & 4 deletions example/log_transformation.txt

This file was deleted.

6 changes: 0 additions & 6 deletions example/test.sh

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 2 additions & 0 deletions example/simplification.txt → examples/simplification.txt
@@ -1,3 +1,5 @@
CAUTION: may be outdated

a + 2*b + 5*b /. (c1_Integer*matcha_Symbol) + (c2_Integer*matcha_Symbol) -> (c1+c2)*matcha
a + b * b /. matcha_Symbol * matcha_Symbol -> matcha^2
a + b - b /. matcha_ - matcha_ -> 0
Expand Down
9 changes: 6 additions & 3 deletions example/calc.go → expreduce.go
Expand Up @@ -72,7 +72,8 @@ func main() {
}
wasSpecialForm := false
for _, specialForm := range specialForms {
asSpecialForm, isSpecialForm := expreduce.HeadAssertion(res, specialForm)
asSpecialForm, isSpecialForm := expreduce.HeadAssertion(
res, specialForm)
if !isSpecialForm {
continue
}
Expand All @@ -83,12 +84,14 @@ func main() {
"Out[%d]//%s= %s\n\n",
promptNum,
specialForm[7:],
asSpecialForm.Parts[1].StringForm(specialForm[7:], context, contextPath),
asSpecialForm.Parts[1].StringForm(
specialForm[7:], context, contextPath),
)
wasSpecialForm = true
}
if !wasSpecialForm {
fmt.Printf("Out[%d]= %s\n\n", promptNum, res.StringForm("InputForm", context, contextPath))
fmt.Printf("Out[%d]= %s\n\n", promptNum, res.StringForm(
"InputForm", context, contextPath))
}
}

Expand Down
File renamed without changes.

0 comments on commit 729156a

Please sign in to comment.