-
Notifications
You must be signed in to change notification settings - Fork 5
/
scripts.yml
78 lines (66 loc) · 2.29 KB
/
scripts.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
scripts:
build:
desc: bundles the source files and copies it to dist folder
cmd: deno run scripts/build.ts
allow:
- write
- read
- env
- run
- net
bundle:
cmd: deno bundle src/mod.ts dist/bundle.js
gen_parser:
desc: applies the grammar patch and generates the parser. Optional [-v --verbosity](=1|2) to create a verbose parser
cmd:
- python -m tools.gen_parser
gen_asdl:
desc: generate the ast nodes
cmd: python -m tools.gen_asdl
format:
desc: run the pre-commit hooks on all files
cmd: pre-commit run --all-files
gen_ast:
desc: generate ast dumps for run-tests
cmd: cd run-tests && ls -1 *.py | xargs -n1 python3 tools/dump-ast.py
apply_grammar_patch:
desc: apply the grammar.patch file to the python.gram file
cmd:
- cd ../cpython/Grammar && git checkout -- python.gram
- cd ../cpython/Grammar && git apply ../../skulpt_parser/tools/patch/grammar.patch
gen_grammar_patch:
desc: generate a grammar.patch file from the python.gram file
cmd: cd ../cpython/Grammar && git diff -- python.gram -p > ../../skulpt_parser/tools/patch/grammar.patch
test:
desc: run all tests or include a short name <dump|parse> <option list of test ...number[]> --fail-fast
cmd: deno run scripts/test.ts
allow:
- read
- run
- env
parse:
desc: takes in a filename or number as the first argument. To add logging generate a verbose parser.
cmd: deno run scripts/parse.ts
allow:
- read
- run
symtable:
desc: takes in a filename or number as the first argument. To add logging generate a verbose parser.
cmd: deno run scripts/symtable.ts
allow:
- read
- run
parse_str:
desc: takes in a string as the first argument. Creates a temp file and the calls vr parse
cmd: deno run scripts/parse_str.ts
allow:
- read
- run
- write
bench:
desc: Parse a file
cmd: deno run scripts/bench.ts
allow:
- read
- run
- write