Skip to content

Instantly share code, notes, and snippets.

View vovs03's full-sized avatar

Vλadimir Pavλychev vovs03

View GitHub Profile
=begin
The goal here is to build a very simple compiler, for a very simple language. We will have very simple constructs for now like def f(x,y) add(42, add(x,y)) end, which says in English, define a function f that takes 2 arguments (x,y) and returns the return value of add(42, add(x, y)). This could easily be much more complex, but I wanted to keep things simple for high level understanding. Feel free to expand on this in your own languages 😉
This code will consist of 3 main components: a lexer (or tokenizer), a parser, and a code generator.
Note that this code does NOT use the most efficient practices for compiler building, but rather the simplest approach for understanding purposes.
The simple version of this compiles the code down to python. feel free to test it! 😎
While I do work in the system field, compiler design is not my area of expertise, and I referred to a number of written sources to put this together.
@vovs03
vovs03 / ace_compiler. rb
Created June 7, 2018 19:46
Ace compiler
=begin
The goal here is to build a very simple compiler, for a very simple language. We will have very simple constructs for now like def f(x,y) add(42, add(x,y)) end, which says in English, define a function f that takes 2 arguments (x,y) and returns the return value of add(42, add(x, y)). This could easily be much more complex, but I wanted to keep things simple for high level understanding. Feel free to expand on this in your own languages 😉
This code will consist of 3 main components: a lexer (or tokenizer), a parser, and a code generator.
Note that this code does NOT use the most efficient practices for compiler building, but rather the simplest approach for understanding purposes.
The simple version of this compiles the code down to python. feel free to test it! 😎
While I do work in the system field, compiler design is not my area of expertise, and I referred to a number of written sources to put this together.
@vovs03
vovs03 / verses-2018-ii
Created June 1, 2018 15:05
QBT verses-2018-ii
|1 |14 неделя |Фил. 4:19 |
|2 |15 неделя |Иер. 29:11 |
|3 |16 неделя |Матф. 11:28-30|
|4 |17 неделя |Матф. 6:33 |
|5 |18 неделя |Ис. 41:10 |
|6 |19 неделя |Матф. 7:11 |
|7 |20 неделя | Матф. 7:7 |
|8 |21 неделя |1 Ин. 2:1 |
|9 |22 неделя |Евр. 7:25 |
|10|23 неделя |Пс. 31:8 |
@vovs03
vovs03 / client-server-examples.ru.md
Last active May 30, 2018 05:31
Client-server(Examples)

Client-server (Examples)

client_server {
  "Цветок"                 : "Улей";
  "Светофор"               : "Система Управления Дор. Транспорта";
  "Табло рейсов(Аэропорт)" : "Диспетчерский пульт";
  "Кнопка лифта"           : "Машинное отделение";
 "Булочная" : "Пекарня";
@vovs03
vovs03 / heroku-login.ru.md
Last active May 27, 2018 10:48
Heroku login (Why not done?)

Problem: heroku login

environment, versions

OS: LinuxMint 18.3

Package Status
npm installed
heroku installed
@vovs03
vovs03 / link.ru.md
Last active May 23, 2018 15:02
Markdown link
huawei cro-u00 emui 4.1mini android 6.0 сохранить фото на sd карту
http://sms-mms-free.ru/phone/service/problem_memory/Huawei
https://www.mvideo.ru/products/smartfon-huawei-y3-2017-gold-cro-u00-30029366/reviews
@vovs03
vovs03 / Some commands in terminal.md
Last active April 12, 2018 13:25
Some commands in terminal

To Show cd /etc/xdg/autostart && sudo sed --in-place 's/NoDisplay=true/NoDisplay=false/g' *.desktop

To Hide cd /etc/xdg/autostart && sudo sed --in-place 's/NoDisplay=false/NoDisplay=true/g' *.desktop

Check system [Analyze] systemd-analyze

@vovs03
vovs03 / Connecter-in-church.ru.md
Created March 31, 2018 13:14
Connecter inchurch

14й канал штекер сцены для ноутбука.