Coder Social home page Coder Social logo

at_lab1's Introduction

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:

<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'.

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 <fileToParse> (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

at_lab1's People

Contributors

jordamo avatar kpedit avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.