Login Register


Tutorial CYFPL - Part 1 - Trees, trees, and more trees filter_list
Author
Message
RE: CYFPL - Part 1 - Trees, trees, and more trees #11
(01-02-2017, 04:15 AM)phyrrus9 Wrote:
(01-02-2017, 04:12 AM)God Wrote:
(01-02-2017, 03:58 AM)phyrrus9 Wrote: The uni i went to had a policy that if 7 or more students requested a class they had to teach it the following term, if you're still attending that might be something you could look into. Love you too

Too late for me now  Wink2
We've had people request classes before but it just doesn't work that way there. Too small of a school and even smaller of a department. Just got stuck with whatever electives were being taught.

Well that's no fun. I'm open to doing tutorials on other compiler methods as long as I can keep a group of more than 4 people interested. It's a little difficult for me to write up a major tutorial and only get like 1 interested party.

That's true. This is your time so use it wisely. In any case, writing tutorials can help your own understanding and you can share it elsewhere also.
"If you look for the light, you can often find it. But if you look for the dark, that is all you will ever see.”


Reply

RE: CYFPL - Part 1 - Trees, trees, and more trees #12
Why should you read the tree from right to left? Is that just protocol, because it seemed simpler to read it as normal from left to right. Also, what exactly does factor refer to in the larger tree? Of course I know what a factor is in mathematics but I'm not sure if this is the same thing.
(This post was last modified: 01-02-2017, 08:27 PM by Nil.)
"If you look for the light, you can often find it. But if you look for the dark, that is all you will ever see.”


Reply

RE: CYFPL - Part 1 - Trees, trees, and more trees #13
(01-02-2017, 08:26 PM)God Wrote: Why should you read the tree from right to left? Is that just protocol, because it seemed simpler to read it as normal from left to right. Also, what exactly does factor refer to in the larger tree? Of course I know what a factor is in mathematics but I'm not sure if this is the same thing.

That's my bad, you're correct it should be left to right.

A factor, in the sense of this project is a parenthesized expression, a number, or a variable.
It looks like in the large tree they like to use (E) form more than anything.

Reply

RE: CYFPL - Part 1 - Trees, trees, and more trees #14
I almost didn't open this because I had no idea what CYFPL stood for, thanks for the [confusing] guide.


(11-02-2018, 02:51 AM)Skullmeat Wrote: Ok, there no real practical reason for doing this, but that's never stopped me.

Reply

RE: CYFPL - Part 1 - Trees, trees, and more trees #15
(01-02-2017, 09:28 PM)Ender Wrote: I almost didn't open this because I had no idea what CYFPL stood for, thanks for the [confusing] guide.

Yeah, I did this one a little bit differently, it had an intro, which seems to have been cast into the depths of the coding section now. There is a link in my signature to the intro though if you still want to read it

[+] 1 user Likes phyrrus9's post
Reply

RE: CYFPL - Part 1 - Trees, trees, and more trees #16
I think I understood all of that, but just to make sure I'm missing nothing, the blank tokens in [url=https://i.stack.imgur.com/SyonV.png]this picture[/i] are just EOL-type things, right? And if so, wouldn't it save a potential bunch of stack frames to get rid of it when running it through the lexer, compiler, and everything else that's included in actually running a program?

Anyway, awesome start to what I hope will be another great series!
It's often the outcasts, the iconoclasts ... those who have the least to lose because they
don't have much in the first place, who feel the new currents and ride them the farthest.

Reply

RE: CYFPL - Part 1 - Trees, trees, and more trees #17
(01-03-2017, 03:45 AM)Inori Wrote: I think I understood all of that, but just to make sure I'm missing nothing, the blank tokens in [url=https://i.stack.imgur.com/SyonV.png]this picture[/i] are just EOL-type things, right? And if so, wouldn't it save a potential bunch of stack frames to get rid of it when running it through the lexer, compiler, and everything else that's included in actually running a program?

Anyway, awesome start to what I hope will be another great series!

Yeah, the blank tokens put me at a loss as well, I assume they just indicate end of token/line, but in any case I would ignore them, the remainder of the tree grasps everything we are going to use. As far as lexing and compiling goes, we won't be storing any of this information, so we don't handle cleanup. The key here is this is a recursive parser, so everything we need will be conveniently held in stack frames and handled for us by the C ABI.

Reply

RE: CYFPL - Part 1 - Trees, trees, and more trees #18
Must say I fucking love your tutorials Tongue Good job as always sir.
[Image: fb366923-c0ba-4201-8792-0d02804dcf21?download=false]

Reply

RE: CYFPL - Part 1 - Trees, trees, and more trees #19
Thank you for taking the time to write this up!

Deserves a bump.

Reply

RE: CYFPL - Part 1 - Trees, trees, and more trees #20
(03-13-2017, 08:48 PM)m0dem Wrote: Thank you for taking the time to write this up!

Deserves a bump.

Not a problem man! Writing these keeps my skills sharp at the same time, so always happy to

Reply







Users browsing this thread: 1 Guest(s)