k1ckdown / BlockInterpreter

Mobile dev module. Higher IT School TSU.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

πŸ”³ Block Interpreter

iOS Swift 5

πŸ›  Used Tech

  • Swift
  • UIKit
  • SnapKit
  • FileManager
  • Combine + CombineCocoa
  • MVVM-C architecture

🎯 About

πŸŽ“ This project was completed as part of the educational module at the Higher IT School of TSU (Tomsk State University) on mobile development

πŸ“± It was necessary to implement an algorithm interpreter in the form of a mobile application

βœ… App Features:

  • Change the sequence of blocks on the workspace by drag and drop
  • Wiggle mode
  • 17 blocks are available for writing your algorithm
  • Remove any block or all
  • Block data is stored regardless of the current screen
  • User can save his algorithm
  • The preview of the saved algorithm uses its image
  • Preview on the workspace
  • Table of blocks with sections of block types

βœ… Interpreter:

We utilized an Abstract Syntax Tree (AST) to construct and execute commands.

The features include:

  • Variable declaration and initialization
  • Support for complex arithmetic expressions with parentheses
  • If, else-if, else statements
  • Comparison operations and logical operators
  • While and for loops
  • Block scoping with begin/end
  • Dynamic array declaration and manipulation (append, remove, pop)
  • Element access by index
  • Continue and break statements
  • Logical operators with boolean values
  • Function implementation with variable scope
  • Support for multiple data types (int, double, bool, string)
  • Type conversion and automatic type inference
  • Type checking for variables
  • String concatenation for any string types

Demo

demo

Screenshots

How to run

Clone or download the project and run pod install.

About

Mobile dev module. Higher IT School TSU.


Languages

Language:Swift 99.9%Language:Ruby 0.1%