LBRY Block Explorer

LBRY Claims • parser-hacking-09-parsing-method-calls

6539abaafff8b80bd3f0371fbf2e7a1659a862d8

Published By
Created On
11 Dec 2020 07:10:42 UTC
Transaction ID
Cost
Safe for Work
Free
Yes
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.

GitHub: https://github.com/seven1m/natalie
Twitter: https://twitter.com/timmrgn

#programming #ruby #cpp #parsers #compilers #recursivedescentparser #prattparser
...
https://www.youtube.com/watch?v=3ZZihogQSek
Author
Content Type
Unspecified
video/mp4
Language
English
Open in LBRY

More from the publisher

Controlling
VIDEO
ADDIN
Controlling
VIDEO
WRITI
Controlling
VIDEO
COMPI
Controlling
VIDEO
LANGU
Controlling
VIDEO
WRITI
Controlling
VIDEO
SELF-
Controlling
VIDEO
ADDIN
Controlling
VIDEO
WRITI
Controlling
VIDEO
WRITI