2018-01-05 11:17:59 +00:00
|
|
|
PHPFILE=example.php
|
2017-11-07 06:21:38 +00:00
|
|
|
|
2018-01-17 17:16:06 +00:00
|
|
|
all: ./parser/php7.go ./parser/scanner.go
|
2017-11-23 15:33:47 +00:00
|
|
|
rm -f y.output
|
|
|
|
gofmt -l -s -w *.go
|
2017-11-07 06:21:38 +00:00
|
|
|
go build
|
|
|
|
|
|
|
|
run: all
|
2018-01-05 11:17:59 +00:00
|
|
|
./php-parser $(PHPFILE)
|
2017-11-07 06:21:38 +00:00
|
|
|
|
2017-12-04 10:40:36 +00:00
|
|
|
test: all
|
2018-01-12 23:59:24 +00:00
|
|
|
go test ./... --cover
|
2017-12-04 10:40:36 +00:00
|
|
|
|
|
|
|
./parser/scanner.go: ./parser/scanner.l
|
2017-11-23 15:33:47 +00:00
|
|
|
golex -o $@ $<
|
|
|
|
|
2018-01-17 17:16:06 +00:00
|
|
|
./parser/php7.go: ./parser/php7.y
|
2017-11-23 15:33:47 +00:00
|
|
|
goyacc -o $@ $<
|