Skip to content

Latest commit

 

History

History
93 lines (67 loc) · 1.98 KB

Development-Setup.md

File metadata and controls

93 lines (67 loc) · 1.98 KB

Development Setup

This document contains the basic information about installation, setup, and project structure.

Prerequisites

  • Python 3 — required.
  • pip — required for installing Python dependencies.
  • Task — recommended for running project tasks.
  • Java 17+ — optional, only required when regenerating parser code from the ANTLR grammar files.

Install Task

Task is a tool for running project tasks.

On Windows:

winget install Task.Task

Check that it works:

task --list

Ensure Python 3 is installed

Make sure Python 3 is installed and available on your system path.

Check it with:

python --version

Ensure pip is available

In most Python 3 installations, pip is already included.

Check that pip is available:

python -m pip --version

If needed, try:

python -m ensurepip --upgrade

Install Python dependencies

To install dependencies, you can run the install task:

task install

Or run this command directly:

python -m pip install -e .

Install Java 17+

Java is only needed if you want to regenerate parser code from the ANTLR grammar files.

Make sure you have JDK 17 or higher installed.

Check your Java version with:

java -version

Regenerate ANTLR-generated source files

To regenerate the parser and lexer source files from the ANTLR grammar, run:

task antlr

The generated code will go into src/grammar/generated, and shall not be hand-edited since that content will get overwritten on the next generation.

Function names

Function names should follow PEP 8 naming conventions.

Exception: generated ANTLR files under:

src/yini_parser/grammar/generated/

These files are generated by ANTLR4 and should not be manually renamed or reformatted.

ANTLR references