Done by Alex Gospodchikov and Landysh Galieva
Group: SE
Language: Swift 4 We implemented swift 4 because this version has the most complete documentation.
To run our program, a Python 3.7 must be installed and added Python Lex-Yacc.
You can install PLY by using pip: pip install ply
The code used for testing should be compiled by default compilator and should not contain what is written in the "What we didn't implemented" part. Otherwise, we can't guarantee the correct operation of our analyzer.
You can run our code from SwiftParser.py
Tests are entered only from a file. Your tests should be in the root folder and named in.txt.
The output of the program occurs in out.txt.
In the root folder is the folder Test which contains tests that you can use to verify the correct work of our code.
We recommend you to read bnf.pdf (You can this file in the root folder) or sections "What we implemented" and "What we don't implement".
- imports
- functions (with params, function calls)
- cycles
- if's
- simple expressions (with +-*/() )
- string and number literals
- variables, assignments
- tuple
- functional type Note for json tree:
- Optional function IDs are not displayed to improve readability.
- If the variable is optional (can be of type nil), it will be displayed in the tree sub-item
- generic
- array's literal
- expression literals
- creating own operator
- presence group