https://github.com/kpedit/at_lab1
This is my homework №1 for AT lessons :)
https://github.com/kpedit/at_lab1
at ipynb ipynb-jupyter-notebook lex makefile matplotlib python regex smc test testing timing
Last synced: 3 months ago
JSON representation
This is my homework №1 for AT lessons :)
- Host: GitHub
- URL: https://github.com/kpedit/at_lab1
- Owner: KPEdit
- Created: 2021-09-23T20:44:58.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2021-10-16T15:53:42.000Z (over 3 years ago)
- Last Synced: 2025-01-12T17:09:42.142Z (4 months ago)
- Topics: at, ipynb, ipynb-jupyter-notebook, lex, makefile, matplotlib, python, regex, smc, test, testing, timing
- Language: Jupyter Notebook
- Homepage:
- Size: 11.1 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# AT_lab1
## Description
This is my homework №1 for AT lessons :)## Tools that were used:
- SMC
- Regex
- LeX## Task
My programm should parse this type of string in three different ways:```c
(int|short|long) (= )
```If the parsed string is correct, the programm should return a NodeVal object, else it will return the string 'Incorrect'.
### Notes
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 ```1-9```.
## UsageIn 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 (logFile)``` (it's a feature:)).## Testing
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.## SMC graph
