This is my homework №1 for AT lessons :)
Tools that were used:
My programm should parse this type of string in three different ways:
<LineNumber> (int|short|long) <varName> (= <varName|Integer>)
If the parsed string is correct, the programm should return a NodeVal object, else it will return the string 'Incorrect'.
NodeVal object contains information about LineNumber and varName that were entered with the string.
varName should start with any letter from
a-zA-Z and continue with any letter from
a-zA-Z0-9 up to 16 characters.
LineNumber and Integer should start with any digits from
In console you should
make run to select one of three parsers and a dialog mode.
There are two types of a dialog mode:
- Console mode - you can enter your string in the console and see results of the parsers.
- File mode - you can enter to this mode if you run
python3 ./laba/Dialog.py <fileToParse> (logFile)(it's a feature:)).
You can put several
*.test files into the
./tests dir and run
make test to generate multiple log files in the
./tests/logs dir for each parser.