Skip to content

avirajsingh7/lpython

Repository files navigation

LFortran

LFortran is an interactive Fortran compiler built on top of LLVM.

Installation

From a Tarball

This is the easiest way.

Install prerequisites and LFortran (works on both Linux and Mac):

conda create -n lfortran python=3.7 pytest llvmlite prompt_toolkit
conda activate lfortran
pip install antlr4-python3-runtime
tar xzf lfortran-0.1.tar.gz
cd lfortran-0.1
pip install .

Now the lfortran environment has the lfort compiler available.

Optional: run tests:

py.test --pyargs lfortran

From Git

This works both on Linux and a Mac:

conda create -n lfortran python=3.7 pytest llvmlite prompt_toolkit
conda activate lfortran
pip install antlr4-python3-runtime

Install Java and then ANTLR, say, into ~/ext:

export CLASSPATH="$HOME/ext/antlr-4.7-complete.jar:$CLASSPATH"

Build:

./build.sh

Run tests:

py.test

Run prompt:

./prompt

About

Python compiler

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 82.2%
  • Python 12.8%
  • C 2.1%
  • CMake 1.2%
  • Yacc 0.7%
  • Jupyter Notebook 0.6%
  • Other 0.4%