Skip to content

erfanaasi/python2-monitors

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

53 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python2 version of the Python-monitors package.

How to run it:

  1. Install package:
    git clone git@github.com:erfanaasi/python2-monitors.git
    cd <clone-dir>
    python setup.py install
  1. Install required packages:
    pip install ctx
    mkdir -p lib
    cd lib
    wget 'https://www.antlr.org/download/antlr-4.7.1-complete.jar'
    pip install antlr4-python2-runtime==4.7.1
  1. For permanent settings use:
    cd <clone-dir>
    echo "export CLASSPATH=\".:$PWD/lib/antlr-4.7.1-complete.jar:$CLASSPATH\"" >> ~/.bashrc
    echo "alias antlr4=\"java -jar $PWD/lib/antlr-4.7.1-complete.jar -visitor\"" >> ~/.bashrc
    echo "alias grun=\"java org.antlr.v4.gui.TestRig\"" >> ~/.bashrc
    echo 'export PYTHONPATH="${PYTHONPATH}:/path/to/python2-monitors"' >> ~/.bashrc
  1. For creating the parser files (same works for RegExp.g4):
    cd <clone-dir>/monitors/parser
    antlr4 -Dlanguage=Python2 PastMTL.g4
  1. To test the installation:
    cd <clone-dir>/examples
    python example_mtl_1.py

About

Python2 version of python-monitors package

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Python 88.7%
  • ANTLR 11.3%