Our server costs ~$56 per month to run. Please consider donating or becoming a Patron to help keep the site running. Help us gain new members by following us on Twitter and liking our page on Facebook!
Current time: July 30, 2025, 2:57 pm

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Complicated AST manipulation looks ugly in C++. How to refactor it?
#18
RE: Complicated AST manipulation looks ugly in C++. How to refactor it?
(January 29, 2022 at 1:26 am)FlatAssembler Wrote:
(January 27, 2022 at 2:16 pm)Jehanne Wrote: Isn't that the whole point of a compiler, to translate computer code into machine code?

No, that is what the assembler is doing. An assembler is translating computer code (assembly code) into machine code. A compiler is translating computer code into assembly code. A compiler does not have to deal with machine code at all, that is the assembler's job.

My understanding is that some compilers, after the syntax analysis and parsing trees, proceed directly to the binary code while others generate assembly code that the assembler then uses to generate the machine code.
Reply



Messages In This Thread
RE: Complicated AST manipulation looks ugly in C++. How to refactor it? - by Jehanne - January 29, 2022 at 8:52 am



Users browsing this thread: 1 Guest(s)