Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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: 1 day ago
JSON representation

This is my homework №1 for AT lessons :)

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```.
## Usage

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 (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
![SMC_graph](laba/utils/laba1_graph.svg)