Skip to content

Commit

Permalink
Merge pull request #39 from AndreasAakesson/master
Browse files Browse the repository at this point in the history
Revert putting files in bin dir
  • Loading branch information
AnnikaH authored Nov 22, 2017
2 parents 6e7546c + ab85ca1 commit 9d3ac18
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
*.tar.gz
bin/*
*.pyc
NaCl.tokens
NaClLexer.py
NaClLexer.tokens
NaClListener.py
NaClParser.py
NaClVisitor.py
4 changes: 2 additions & 2 deletions NaCl.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#! /usr/bin/env python
import sys
sys.path.append('bin')

from antlr4 import *
from NaClLexer import *
from NaClParser import *
from NaClVisitor import *
import sys
import os

import pystache
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
1. Install antlr4 exactly like described under Quick start: http://www.antlr.org/
2. `pip install antlr4-python2-runtime`
3. `pip install pystache`
4. Generate python parser / lexer for `NaCl.g4` grammar WITH visitor (NaClVisitor.py): `antlr4 -Dlanguage=Python2 NaCl.g4 -visitor -o bin`
4. Generate python parser / lexer for `NaCl.g4` grammar WITH visitor (NaClVisitor.py): `antlr4 -Dlanguage=Python2 NaCl.g4 -visitor`
5. Make transpiler program executable: `chmod u+x NaCl.py`
6. run with `cat examples/nacl.nacl | ./NaCl.py`
7. For testing, using the `grun` program (alias really) is nice. This requires that you generate the java lexer / parser
Expand Down
3 changes: 2 additions & 1 deletion create_bundle.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/bin/bash

FILES="NaCl.tokens NaClLexer.py NaClLexer.tokens NaClListener.py NaClParser.py NaClVisitor.py"
TARFILE="nacl_bin.tar.gz"
tar -zcvf $TARFILE bin
tar -zcvf $TARFILE $FILES
echo -e "> Created $TARFILE"
md5 $TARFILE

0 comments on commit 9d3ac18

Please sign in to comment.