Skip to content

Commit d70d7d4

Browse files
committed
bringing antlr4 back; can't find libraries / hack global variables without it
1 parent ff2fd0e commit d70d7d4

File tree

5 files changed

+21
-4
lines changed

5 files changed

+21
-4
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
/build/
33
/dist/
44
/build.number
5+
/src/info/sansgills/mode/python/preproc/*.java # generated files
6+
/src/info/sansgills/mode/python/preproc/*.tokens # generated files
57

68
# Java things #
79
*.class

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ Done:
1919
- Basic preprocessor
2020

2121
Currently working on:
22-
- Architechture
22+
- Proper parser for the preprocessor
2323

2424
Future work:
25+
- Library imports and sketch exports
2526
- Better autoindent & syntax highlighting
26-
- Proper parser for the preprocessor
2727
- REPL for live coding
2828

2929
A working sketch (copy and paste into the PDE to try it out!):

build.xml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
</fileset>
3636

3737
<fileset dir="lib" >
38-
<include name="*.jar" /> <!-- jython -->
38+
<include name="*.jar" /> <!-- jython and antlr runtime -->
3939
</fileset>
4040
</path>
4141

@@ -44,11 +44,22 @@
4444
- - - - - - - - - - - - - - - - - - - - - - - -->
4545
<target name="get">
4646
<mkdir dir="lib" />
47+
<mkdir dir="tool" />
4748
<get
4849
src="http://search.maven.org/remotecontent?filepath=org/python/jython-standalone/2.7-b1/jython-standalone-2.7-b1.jar"
4950
dest="lib/jython-standalone-2.7-b1.jar"
5051
skipexisting="true"
5152
verbose="true" /> <!-- download latest jython (note: update this if jython updates) -->
53+
<get
54+
src="http://www.antlr.org/download/antlr-runtime-4.1.jar"
55+
dest="lib/antlr-runtime-4.1.jar"
56+
skipexisting="true"
57+
verbose="true" /> <!-- download latest ANTLR runtime (to include with the mode) -->
58+
<get
59+
src="http://antlr4.org/download/antlr-4.1-complete.jar"
60+
dest="tool/antlr-4.1-complete.jar"
61+
skipexisting="true"
62+
verbose="true" /> <!-- download latest ANTLR compiler (to compile our grammars; not included) -->
5263
</target>
5364

5465
<!-- - - - - - - - - - - - - - - - - - - - - - -
@@ -83,7 +94,7 @@
8394
<!-- make mode jar -->
8495
<jar jarfile="${bundle}/mode/${lib.name}.jar" basedir="build" includes="${lib.path}/*.class"/>
8596
<!-- make wrapper jar -->
86-
<jar jarfile="${bundle}/mode/${wrap.name}.jar" basedir="build" includes="${wrap.path}/*"/> <!-- include prepend.py -->
97+
<jar jarfile="${bundle}/mode/${wrap.name}.jar" basedir="build" includes="${wrap.path}/*"/> <!-- include *.py -->
8798

8899

89100
<copy todir="${bundle}">
@@ -124,6 +135,9 @@
124135
<target name="clean" >
125136
<delete dir="${build}" />
126137
<delete dir="${dist}" />
138+
<delete>
139+
<fileset dir="${src}/info/sansgills/mode/python/preproc" includes="*.java *.tokens" /> <!-- remove generated files -->
140+
</delete>
127141
</target>
128142

129143
</project>

release/PythonMode.zip

227 KB
Binary file not shown.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
//TODO

0 commit comments

Comments
 (0)