File tree 3 files changed +18
-12
lines changed
3 files changed +18
-12
lines changed Original file line number Diff line number Diff line change 1
1
.antlr
2
- gqlex /
2
+ gqlex /
3
+ __pycache__ /
Original file line number Diff line number Diff line change 1
1
gen_dir = gen
2
2
lang = Java
3
+ package = com.intuit.oss.gqlex.parser
3
4
4
- .PHONY : all clean install
5
+ .PHONY : all clean install test_cases
5
6
6
- all :
7
+ all : install
7
8
@echo " Generating code..."
8
9
@mkdir -p $(gen_dir )
9
- @antlr4 -Dlanguage=$(lang ) -o $(gen_dir ) -visitor -lib $(gen_dir ) gqlex.g4
10
+ @source gqlex/bin/activate ; antlr4 -Dlanguage=$(lang ) -o $(gen_dir ) -visitor -package $( package ) -lib $(gen_dir ) gqlex.g4
10
11
11
- clean :
12
- rm -rf $(gen_dir ) /*
13
-
14
- install :
12
+ install : requirements.txt
15
13
@echo " Installing dependencies..."
16
- @pip install antlr4-tools
14
+ @python3 -m venv gqlex && source gqlex/bin/activate ; python3 -m pip install -r requirements.txt
17
15
18
- test_cases :
16
+ test_cases : install
19
17
@echo " Generating test cases..."
20
- @grammarinator-process gqlex.g4 -o tests/fuzzer/ --no-actions
21
- @grammarinator-generate gqlexGenerator.gqlexGenerator -r document -d 25 -n 10 -o tests/cases/test_%d.gql --sys-path tests/fuzzer/
18
+ @mkdir -p tests/fuzzer/ tests/cases/
19
+ @source gqlex/bin/activate; grammarinator-process gqlex.g4 -o tests/fuzzer/ --no-actions
20
+ @source gqlex/bin/activate; grammarinator-generate gqlexGenerator.gqlexGenerator -r document -d 25 -n 10 -o tests/cases/test_%d.gql --sys-path tests/fuzzer/
21
+
22
+ clean :
23
+ rm -rf $(gen_dir ) /* tests/ gqlex/ gen/
Original file line number Diff line number Diff line change
1
+ grammarinator == 23.7
2
+ antlr4-python3-runtime == 4.13.0
3
+ antlr4-tools == 0.2.1
You can’t perform that action at this time.
0 commit comments