rubyx/lib/vool
Torsten Ruger 4fe0edd1e3 first risc level block test working
assign was not executing yield
baecause it was just testing for send, instead of callable
2018-07-30 20:11:52 +03:00
..
array_statement.rb moved statements up one dir 2018-06-29 22:46:00 +03:00
assignment.rb first risc level block test working 2018-07-30 20:11:52 +03:00
basic_values.rb split compilers resolve_type into the three possibilities 2018-07-16 12:03:40 +03:00
block_statement.rb push the callable into the callable compiler 2018-07-30 10:26:11 +03:00
call_statement.rb abstract CallStatement base class, just like in ruby 2018-07-30 14:45:37 +03:00
class_statement.rb moved all the normalize stuff over to the ruby layer 2018-07-19 14:47:29 +03:00
hash_statement.rb moved statements up one dir 2018-06-29 22:46:00 +03:00
if_statement.rb moved all the normalize stuff over to the ruby layer 2018-07-19 14:47:29 +03:00
ivar_assignment.rb fix ruby variables 2018-07-20 14:22:26 +03:00
local_assignment.rb fx ruby send args 2018-07-20 20:06:14 +03:00
logical_statement.rb add to_s for statements 2018-07-03 22:18:19 +03:00
method_statement.rb push the callable into the callable compiler 2018-07-30 10:26:11 +03:00
README.md polish docs 2018-03-11 16:11:15 +05:30
return_statement.rb moved all the normalize stuff over to the ruby layer 2018-07-19 14:47:29 +03:00
send_statement.rb abstract CallStatement base class, just like in ruby 2018-07-30 14:45:37 +03:00
statement.rb abstract CallStatement base class, just like in ruby 2018-07-30 14:45:37 +03:00
statements.rb fx ruby send args 2018-07-20 20:06:14 +03:00
variables.rb makeing the method of the compiler more or less private 2018-07-09 19:32:17 +03:00
while_statement.rb moved all the normalize stuff over to the ruby layer 2018-07-19 14:47:29 +03:00
yield_statement.rb first risc level block test working 2018-07-30 20:11:52 +03:00

VOOL

Virtual Object Oriented Language

in other words, ruby without the fluff.

Possibly later other languages can compile to this level and use rx-file as code definition.

Syntax tree

Vool is the layer of concrete syntax tree. The Parser gem is used to parse ruby. It creates an abstract syntax tree which is then transformed.

The next layer down is the Mom, Minimal object Machine, which uses an instruction tree. That is on the way down we create instructions, but stays in tree format. Only the next step down to the Risc layer moves to an instruction stream.

The nodes of the syntax tree are all the things one would expect from a language, if statements and the like. There is no context yet, and actual objects, representing classes and methods, will be created on the way down.

Fluff

Ruby has lots of duplication to help programmers to write less. An obvious example is the existence of until, which really means if not. Other examples, some more impactful are:

  • No implicit blocks, those get passed as normal arguments (the last)
  • No splats
  • no case
  • no elseif (no unless, no ternary operator)
  • no global variables.