Re:Create Your Own Compiler: A step-by-step interactive tuto...
by pomatic on Sunday November 27, 2022 @11:49AM
(#33764303)
This approach won't work if you live somewhere windy^ - the cables will chafe and even with the nylon spacer, will likely short and/or electrify the soffit with obvious associated risks.
^source: first hand experience, albeit with cuphooks rather than magnets.
Re:Create Your Own Compiler: A step-by-step interactive tuto...
by periheli0n on Monday November 28, 2022 @04:10AM
(#33771329)
Mainly that it‘s impossible to go back a step! Sorry if my comment sounded negative — I learnt a lot just by clicking through the steps. Very easy to follow. The steps are just the right size of complexity, the code is very clear.
Re:Create Your Own Compiler: A step-by-step interactive tuto...
by yairhaimo on Tuesday November 29, 2022 @05:33PM
(#33794334)
Thanks!
You cant go back a step at all?
Going back a step might fail in certain cases that I dont have tests for but it should work in general.
I'll keep digging.
Re:Create Your Own Compiler: A step-by-step interactive tuto...
by tzs on Sunday November 27, 2022 @09:10PM
(#33769089)
Although it is older than a fair number of HN readers, a great book from 1990 on compilers is Allen Holub's "Compiler Design in C". It's long out of print but there is a free PDF on Holub's website [1].
The book covers the usual theory and then puts it to use to develop tools for writing compilers (e.g., lexical analyzer generators similar to lex and parser generators similar to yacc) and then with those tools develops a C compiler.
^source: first hand experience, albeit with cuphooks rather than magnets.
(It's my site). Thanks! That's a pretty big caveat, woops. I'll check it out.
Would love to hear some ideas about improved functionality.
I've would preferred a simpler and more traditional design.
The book covers the usual theory and then puts it to use to develop tools for writing compilers (e.g., lexical analyzer generators similar to lex and parser generators similar to yacc) and then with those tools develops a C compiler.
[1] https://holub.com/compiler/