add IDEA antlr parser build info to documentation

This commit is contained in:
Irmen de Jong 2022-08-21 13:32:31 +02:00
parent a878c9a61d
commit bb5ffb24a8
5 changed files with 14 additions and 3 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

View File

@ -47,6 +47,18 @@ For normal use, the ``installDist`` target should suffice and after succesful co
java runtime (11 or newer). If you do have trouble building or running the compiler on your
operating system, please let me know!
To successfully build and debug in IDEA, you have to manually generate the Antlr-parser classes
first. The easiest way to do this is the following:
1. make sure you have the Antlr4 plugin installed in IDEA
2. right click the grammar file Prog8ANTLR.g4 in the parser project, and choose "Generate Antlr Recognizer" from the menu.
3. rebuild the full project.
Alternatively you can also use the Makefile in the antlr directory to generate the parser, but for development the
Antlr4 plugin provides several extremely handy features so you'll probably want to have it installed anyway.
.. image:: _static/antlrparser.png
:alt: Generating the Antlr4 parser files
What is a Prog8 "Program" anyway?

View File

@ -3,7 +3,6 @@ TODO
For next release
^^^^^^^^^^^^^^^^
- check that subs with single integer arg are passing that in A or AY (and the sub itself stores it in the parameter variable)
- vm: intermediate code: don't flatten everything. Instead, as a new intermediary step,
convert the new Ast into *structured* intermediary code.
Basically keep the blocks and subroutines structure, including full subroutine signature information,

View File

@ -1,3 +1,3 @@
parser:
antlr4 -o ../src/prog8/parser -no-listener -no-visitor -package prog8.parser -Dlanguage=Java Prog8ANTLR.g4
antlr4 -o ../src/prog8/parser -no-listener -no-visitor -Dlanguage=Java Prog8ANTLR.g4

View File

@ -2,5 +2,5 @@
rm -f *.bin *.xex *.jar *.asm *.prg *.vm.txt *.vice-mon-list *.list *.p8virt a.out imgui.ini
rm -rf build out
rm -rf compiler/build codeGenCpu6502/build codeGenExperimental/build codeOptimizers/build compilerAst/build dbusCompilerService/build httpCompilerService/build parser/build
rm -rf compiler/build codeGenCpu6502/build codeGenExperimental/build codeOptimizers/build compilerAst/build dbusCompilerService/build httpCompilerService/build parser/build parser/src/prog8/parser