Re:Writing a C compiler in 500 lines of Python
by kwhitefoot on Monday September 04, 2023 @05:51PM
(#37385459)
Surely it is a feature of all Pascal compilers that they are single pass. I thought that it was part of the specification of the language that it be possible to compile in a single pass.
[ Parent
| on HN ]
Re:Writing a C compiler in 500 lines of Python
by eru on Monday September 04, 2023 @10:55PM
(#37387331)
There's a bunch of LLVM-based Pascal compilers these days. I doubt they are single pass, given how LLVM works. (And in general, any optimizing compiler is most likely doing multiple passes.)
You are right about Pascal's original design. Though I'm not sure if that's still true about modern versions of the language?
Re:Writing a C compiler in 500 lines of Python
by pjmlp on Tuesday September 05, 2023 @02:16AM
(#37388443)
Not even old ones, if we taken optimising compilers like VMS Pascal into account.
Re:Writing a C compiler in 500 lines of Python
by drewolbrich on Tuesday September 05, 2023 @12:19AM
(#37387799)
It's disturbing to me that I remembered this, but the IBM Pascal Compiler for DOS (1981) had two passes.
https://winworldpc.com/product/ibm-pascal-compiler/100