juldou / ifj18 Goto Github PK
View Code? Open in Web Editor NEWProjekt do predmetu Formálne jazyky a prekladače - implementácia prekladača imperatívneho jazyka IFJ18
Projekt do predmetu Formálne jazyky a prekladače - implementácia prekladača imperatívneho jazyka IFJ18
toto da syntax error:
a = nil
def a (b, c)
print (b)
end
a (2 3)
^ should be SYNTAX_ERROR
, but it's not
a = "Hello" + "There" + 2
is returning 4, probably should return 2
def b()
end
def a()
b = 5
end
should return ERR_SEMANTIC_DEFINITION
instead of SYNTAX_ERROR
def a(a)
end
a = 10/0
print (a)
vo vygenerovanom kode je DIV
, myslim ze by to mala byt zasobnikova verzia DIVS
(pred tym tam vidim nejake PUSHS
)
a chcel som vlastne skontrolovat delenie nulou co sa mi tym padom nepodarilo
MOVE TF@%1 [email protected]
4.5
format is incorrect
correct format is [email protected]+0,
@j-anonym is doing conversion in expr-parser, but I need it too
def a(b)
b
end
a(nil)
maybe there should be MOVE TF@%1 nil@nil
in generated code? (currently it's not)
def fun_1(param2)
param2 = param2 + 2
end
def fun_2(param1)
c = fun_1(param1)
end
out = fun_2(2)
print out
po interpretacii vrati:
Error at line: 37
Symbol has not been initilized!
pretoze to nevykona DEFVAR LF@param1
, ale rovno dava MOVE
def a(b)
0
end
a(-1)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.