mirror of
https://github.com/irmen/prog8.git
synced 2024-06-12 18:58:42 +00:00
add IDEA antlr parser build info to documentation
This commit is contained in:
parent
a878c9a61d
commit
bb5ffb24a8
BIN
docs/source/_static/antlrparser.png
Normal file
BIN
docs/source/_static/antlrparser.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 35 KiB |
|
@ -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?
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user