forked from antlr/intellij-plugin-v4
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbild.py
executable file
·39 lines (26 loc) · 875 Bytes
/
bild.py
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
#!/usr/bin/env python
# Type "python bild.py" to build all of the parsers needed by the plugin.
# bootstrap by downloading bilder.py if not found
import urllib
import os
if not os.path.exists("bilder.py"):
print "bootstrapping; downloading bilder.py"
urllib.urlretrieve(
"https://raw.githubusercontent.com/parrt/bild/master/src/python/bilder.py",
"bilder.py")
# assumes bilder.py is in current directory
from bilder import *
def latest_antlr4():
mkdir("lib")
# grab the lib that the plugin needs
jarname = "antlr-4.4-complete.jar"
download("http://www.antlr.org/download/" + jarname, "lib")
def parsers():
require(latest_antlr4)
antlr4("src/grammars", "gen", version="4.4",
package="org.antlr.intellij.plugin.parser")
def clean():
rmdir("gen")
def all():
require(parsers)
processargs(globals())