Тёмный

Making a Programming Language (Part 3): How to write a parser in C++ 

Masters of the Void
Подписаться 592
Просмотров 794
50% 1

We delve into expression parsing and end this series with a rambling outlook over what you would have to do once you have a parser. Source code: github.com/uli...

Опубликовано:

 

7 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 4   
@amitdubey9384
@amitdubey9384 8 месяцев назад
Thanks for intuitive video series.
@mastersofthevoid
@mastersofthevoid 7 месяцев назад
Glad you like the videos!
@amitdubey9384
@amitdubey9384 7 месяцев назад
@@mastersofthevoid tx, I am in session 6, I was very much curious to know how bytecode can be generated in assembly direct from the nodes if u detail.
@mastersofthevoid
@mastersofthevoid 7 месяцев назад
@@amitdubey9384 You recursively call each operation's arguments in the tree to generate an instruction. A value (like a number) is just a PUSH_IMMEDIATE_INT instruction pushing that number. Once you've pushed both arguments, you generate code for the actual instruction (e.g. ADD_INTS), which pops both of its arguments and pushes the result.
Далее