File tree 1 file changed +25
-0
lines changed
1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -57,6 +57,31 @@ since 2.8.2 CUP version v11b.
57
57
entry point for the grammar.
58
58
If you need multiple entrypoints, use ANTLRv4.
59
59
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
+
60
85
ANTLRv4
61
86
.......
62
87
You can’t perform that action at this time.
0 commit comments