-
Notifications
You must be signed in to change notification settings - Fork 1
/
Taskfile.yml
79 lines (75 loc) · 1.9 KB
/
Taskfile.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# https://taskfile.dev
version: '3'
tasks:
default:
cmds:
- task -a
silent: true
gen-parser:
cmds:
- task: antlr4-cmd
vars:
ARGS: -Dlanguage=Go -visitor -o gen *.g4
clean-parser:
dir: parser/
cmds:
- rm -rf .antlr
- rm -rf gen/*
test:
cmds:
- go test ./...
prepare-grun:
dir: parser/
cmds:
- task: antlr4-cmd
vars:
ARGS: PCRE.g4
- javac *.java
grun:
dir: parser/
cmds:
- task: grun-cmd
vars:
ARGS: PCRE pcre -tree
deps:
- task: prepare-grun
clean-grun:
dir: parser/
cmds:
- rm *.java *.class *.tokens *.interp
test-cmd:
cmds:
- go run main.go "a" "a|b|c"
- go run main.go "aaaaabaaaaa" "(.*)b(?=aaaaa)\1"
- go run main.go "aacaa" "(?=(a*b*))aac\1"
- go run main.go -e=true "aaa" "\1aaa"
- go run main.go "aaa" "\1aaa"
- go run main.go "aaaaaa" "a*"
- go run main.go "" "a*"
- go run main.go "b" "a*"
- go run main.go "a" "a+"
- go run main.go "aaa" "a+"
- go run main.go "" "a+"
- go run main.go "" "a{3}"
- go run main.go "aaa" "a{3}"
- go run main.go "aaaaa" "a{3}"
- go run main.go "aa" "a{3,}"
- go run main.go "aaa" "a{3,}"
- go run main.go "aaaaa" "a{3,}"
- go run main.go "a" "a{2,4}"
- go run main.go "aa" "a{2,4}"
- go run main.go "aaa" "a{2,4}"
- go run main.go "aaaa" "a{2,4}"
- go run main.go "aaaaa" "a{2,4}"
- go run main.go "aaaaa" "a{2,10}"
# internals
antlr4-cmd:
dir: parser
internal: true
cmds:
- java -Xmx500M -cp "/usr/local/lib/antlr-4.13.1-complete.jar:$CLASSPATH" org.antlr.v4.Tool {{.ARGS}}
grun-cmd:
dir: parser
internal: true
cmds:
- java -Xmx500M -cp "/usr/local/lib/antlr-4.13.1-complete.jar:$CLASSPATH" org.antlr.v4.gui.TestRig {{.ARGS}}