Skip to content

isotoma/antlr4-demo-python3

 
 

Repository files navigation

antlr4-demo-python3

Get ANTLR

Only once, get the JAR for antlr:

curl -o antlr-4.13.1-complete.jar https://www.antlr.org/download/antlr-4.13.1-complete.jar

You'll need java if not already installed

sudo apt install default-jre

Running ANTLR4 on the grammar file

You only need to do this if you change the grammar file Demo.g4.

`./antlr4.sh`

Python setup

pyenv local 3.12
pip install poetry # if not already
poetry self add poetry-plugin-shell

poetry install
poetry shell

Running a program

To execute a program in the Demo language

./democli program1.demo

ANTLR debugging

You can view the tree - TBC

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • ANTLR 74.5%
  • Python 12.8%
  • Shell 12.7%