NaCl is a configuration language for IncludeOS that you can use to add for example interfaces and firewall rules to your service.
Documentation: http://includeos.readthedocs.io/en/latest/NaCl.html
- Install antlr4 exactly like described under Quick start: http://www.antlr.org/
pip install antlr4-python2-runtime
pip install pystache
- Generate python parser / lexer for
NaCl.g4
grammar WITH visitor (NaClVisitor.py):antlr4 -Dlanguage=Python2 NaCl.g4 -visitor
- Make transpiler program executable:
chmod u+x NaCl.py
- run with
cat examples/nacl.nacl | ./NaCl.py
- For testing, using the
grun
program (alias really) is nice. This requires that you generate the java lexer / parser antlr4 NaCl.g4 && javac NaCl*.java
cat examples/nacl.nacl | grun NaCl prog -gui