Re:CP/M Creator Gary Kildall's Memoirs Released as Free Down...
by WalterBright on Saturday July 19, 2025 @12:29AM
(#44612604)
Well, all my compilers use recursive descent for expressions, meaning the stack is used to maintain the current state. Whether you evaluate it while doing this or produce an IR is a trivial difference.
Re:CP/M Creator Gary Kildall's Memoirs Released as Free Down...
by wvenable on Saturday July 19, 2025 @01:01AM
(#44612725)
It might be a trivial difference but it's literally the thing that makes something a compiler. It should make sense. How a piece of software works doesn't make it a compiler or not; it's input and output of the software that defines it as a compiler. That's true of almost any broad category of software.
Re:CP/M Creator Gary Kildall's Memoirs Released as Free Down...
by eichin on Saturday July 19, 2025 @03:11AM
(#44613266)
No problem calling it parsing, but yeah, "compilation" feels like a huge stretch. And they didn't do recursive descent - just tokenizing for compactness (when you only have 4k or 16k of RAM you do things like that) - you could still get syntax errors at runtime. In some interpreters it also served to normalize abbreviations to save typing.
The BASIC interpreter doesn't recognize `3+x*(2+y)` nor does it compile it instead it evaluates that expression using a pair of stacks. You've expanded the definition of compilation to cover almost all computation. It's compilers all the way down to the electrons.