To install the dev-dependencies, simply use ./requirements/dev.txt with pip,
like the following:
pip install -r requirements/dev.txtOr for a virtual environment:
pipenv install -r requirements/dev.txtDownload inno-setup here
Build inside this folder and use the inno-setup.iss file. The generated
installer will be placed inside ./Output
Required for Lexer and Parser Development which include changes on the .g4 grammar files
To download Antlr4 go here
Quickstart Installation Guide on the Main Website: here
Generating the Parser and Lexer is made up of two parts:
- Using Antlr4 to compile the .g4 file to actual source code
- Implementing the Runtime (The user code that is shipped with the binaries)
Note: Generating the Parser and Lexer means that depending on the changes the implementation code needs to be changed.
To generate in the command-line use:
-
For the Pre-Processor:
- Python (Required for the Compiler):
antlr4 -o ./paralang_base/preprocessor/parser -Dlanguage=Python3 ./ParaPreProcessor.g4
- Java:
antlr4 -o ./paralang_base/preprocessor/parser -Dlanguage=Java ./ParaPreProcessor.g4
- Python (Required for the Compiler):
-
For the Core Language:
- Python (Required for the Compiler):
antlr4 -o ./paralang_base/compiler/parser/python -Dlanguage=Python3 ./Para.g4
- Java:
antlr4 -o ./paralang_base/compiler/parser/python -Dlanguage=Java ./Para.g4
- Python (Required for the Compiler):
Afterwards if needed correctly move the folder using:
mv ./path/to/generated/output/* ./src/compiler/core/<insert-destination>/and delete the remaining folder:
rm -rf ./path/to/generated/outputNotes:
- Make sure the alias for
antlr4/antlrexists! Else the command will not work - Comments are only partly ignored in Para.g4, due the intended removal in the Pre-Processor. Errors can occur!
To generate the docs for a one-time usage, use the following:
./docs/make.bat htmlor for an active http server, which will automatically reload changes, use this:
sphinx-autobuild ./docs/source ./docs/build/html