Team: Azat Belgibaev, Sergey Shin, Petr Nikolaev, Ansat Abirov, Ruslan Kim Language: F
To be able to build and run the application you are supposed to have the following software installed:
- Oracle JDK 8 ver. 181
- Maven ver. 3.5.4
and the appropriate environment variables set.
To run the program you can use the following scripts:
run.bat
for Windows OSrun.sh
for Unix based OS
Or you can type the following commands by yourself in the project root directory:
mvn package
cd target
java -jar CSyntaxAnalyzer-1.0.jar
After that the syntax analysis results will be written to out.txt
line by line based on the provided input sources in in.txt
.
In order to run only the implemented JUnit tests you can simply use:
mvn test
In order to generate syntax analyzer via ANTLR you need to: 0. Download maven and add all necessary variables to PATH
- Describe the language grammar in the appropriate format in .g4 file
- Install ANLTR plugin in Intellij IDEA
- Right click on .g4 file and choose
generate ANLTR Recognizer
- Copy the generated files to
src/main/java/anltr