Skip to content

Commit c2897d0

Browse files
committed
[doc] Add prerequisites for Java backend
1 parent 35c66af commit c2897d0

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

docs/user_guide.rst

+25
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,31 @@ since 2.8.2 CUP version v11b.
5757
entry point for the grammar.
5858
If you need multiple entrypoints, use ANTLRv4.
5959

60+
Prerequisites
61+
^^^^^^^^^^^^^
62+
63+
For the Java/CUP backend you need:
64+
65+
- Parser generator: `CUP <http://www2.cs.tum.edu/projects/cup/>`_ libraries version 0.11b.
66+
- Lexer generator `JFLex <https://jflex.de/>`_ or the `JLex <https://www.cs.princeton.edu/~appel/modern/java/JLex/>`_ libraries.
67+
68+
To set up CUP and JLex, follow these instructions:
69+
70+
1. Download the JAVA archives for
71+
`CUP v11b <https://github.com/BNFC/bnfc/raw/master/testing/data/java-cup-11b.jar>`_,
72+
`CUP v11b runtime <https://github.com/BNFC/bnfc/raw/master/testing/data/java-cup-11b-runtime.jar>`_,
73+
and
74+
`JLex <https://github.com/BNFC/bnfc/raw/master/testing/data/JLex-1.2.6.jar>`_.
75+
76+
2. Make sure they are placed in your ``CLASSPATH``.
77+
78+
For example, in Linux or macOS, store these jars in ``${HOME}/java-lib/`` and add the following line to your shell initialization file::
79+
80+
export CLASSPATH=${CLASSPATH}\
81+
:${HOME}/java-lib/java-cup-11b.jar\
82+
:${HOME}/java-lib/java-cup-11b-runtime.jar\
83+
:${HOME}/java-lib/JLex-1.2.6.jar
84+
6085
ANTLRv4
6186
.......
6287

0 commit comments

Comments
 (0)