Skip to content

automato_theory is a repo with experiments with trying to understand automata theory. Also this is a course in MEPHI.

Notifications You must be signed in to change notification settings

kargamant/automata_theory

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

204 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Automato theory🍅

These are my labs from MEPHI automato theory course.

Labs descriptions

lab1

This was just to become familiar with flex framework, SMC tool and regular expressions.

image

lab2

Self-written regex library that allows not only constructing automatos from regexes, but also add them, subtract them and ofcourse match against string.

image

lab3

My own programming language. It has quite limited syntax, but that was enough to make a mini game about robot escaping labirint in this language. Grammar and parser were written using flex and bison libraries.

image image

How to build and use interpreter for this language?

Firstly, build target test with Makefile presented in lab3 directory.
Then, in order to run interpreter in console mode simply run

$ ./test

In order to interpret code from file call the following command:

$ ./test cool_code_file.boba

.boba extension is actually optional, you can load there any file

How to get familiar with syntax?

There are several example programs provided in this repository such as:
binary_number.boba
fibonnachi.boba
geometric_progression.boba
number_reverse.boba
power_of_ten.boba
and many more...

What is a mini game with robot?

This is a little extension of a language that allows to interact with robot and labirint.
As an example, there is a program that implements A-star path-finding algorithm for robot to find exit from labirint.
a_star.boba

If you want to set your own labirint you just need to change name of file given to Map class in compile_vars.h file:

Map labirint{"labirint.txt"};

About

automato_theory is a repo with experiments with trying to understand automata theory. Also this is a course in MEPHI.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages