Parser Hacking [09]: Parsing Method Calls vs Local Variables | Unique Ruby Parser Feature
Ruby's parser has a unique feature: it keeps track of local variables defined in the current scope so it can determine if an identifier is a method call vs a local variable lookup. Let's teach our parser to store local variable assignment in a vector so we can mimic this behavior!
About the Project: Natalie is a very early-stage work-in-progress Ruby implementation that compiles Ruby to an executable. It does so by transpiling Ruby to C++ and feeding it to gcc or clang to produce a binary.
Let's continue our work wrapping the Onigmo Regex library and exposing it to the language! In this video we make a MatchData object that provides information about a regex match.
About the Project: Natalie a programming language that resembles Ruby, compiled to C. Find out more at the GitHub project page: https://github.com/seven1m/natalie
...
https://www.youtube.com/watch?v=fsB6-mtcEFw
I'm writing a programming language that resembles Ruby, called Natalie.
https://github.com/seven1m/natalie
In this video, we add support for raising exceptions within the language. Easy peasy.
...
https://www.youtube.com/watch?v=KFKmAtC9fiY
Picking up from our last LLVM session, let's separate out the printing (puts) from the numbers and strings!
Helpful link: https://mukulrathi.com/create-your-own-programming-language/llvm-ir-cpp-api-tutorial/
About the Project: Natalie is a very early-stage work-in-progress Ruby implementation that compiles Ruby to an executable. It does so by compiling Ruby to C++ and feeding it to gcc or clang to produce a binary.
GitHub: https://github.com/seven1m/natalie
Twitter: https://twitter.com/timmrgn
Discord: https://discord.gg/hnHp2tdQyn
YouTube: https://www.youtube.com/timmorgan
#programming #compiler #cpp #llvm #ruby
...
https://www.youtube.com/watch?v=W0OLQVKtoIw
Continuing our series on building a Ruby parser with a Parsing Expression Grammar, this time we tackle a few minor housekeeping items and then teach out parser to parse more than one expression, i.e. a program. :-)
GitHub: https://github.com/seven1m/natalie
Twitter: https://twitter.com/timmrgn
#programming #ruby #cpp #parsers #compilers #peg
...
https://www.youtube.com/watch?v=A4fKwOHL4_I
I'm writing a programming language that resembles Ruby, called Natalie.
https://github.com/seven1m/natalie
This video is short and sweet; we're just adding some convenient methods to the Array class.
...
https://www.youtube.com/watch?v=x-XqMM2cI-A
CAN WE CREATE INCEPTION??! In this video, we try to get Natalie to compile itself enough so that it can run the Fibonacci example script.
About the Project: Natalie is a very early-stage work-in-progress Ruby implementation that compiles Ruby to an executable. It does so by transpiling Ruby to C++ and feeding it to gcc or clang to produce a binary.
GitHub: https://github.com/seven1m/natalie
Twitter: https://twitter.com/timmrgn
#programming #ruby #cpp #compilers #selfhosted
...
https://www.youtube.com/watch?v=SJuPgHKOgAM
Wrapping POSIX pthreads turned out to be easier than I thought!
About the Project: Natalie a programming language that resembles Ruby, compiled to C. Find out more at the GitHub project page: https://github.com/seven1m/natalie
...
https://www.youtube.com/watch?v=3BQFQS_4a9E
I'm writing a programming language that resembles Ruby, called Natalie.
https://github.com/seven1m/natalie
In this video, I give a short introduction, discover a bug in my compiler in the process, and then proceed to puzzle it out and fix it.
...
https://www.youtube.com/watch?v=TINXK4Rj_ds
I'm writing a programming language that resembles Ruby, called Natalie.
https://github.com/seven1m/natalie
In this video, we add global variables. In Ruby and Natalie, globals start with a dollar sign ($) and are visible everywhere. Things like $LOAD_PATH and regexp match groups ($1, $2, etc.) use globals.
...
https://www.youtube.com/watch?v=uPorkbdwsZA