Menu

SecondCompiler

Tom Harwood

Second Example Compiler

The second example compiler is a more complex version of the first compiler; it has new features that illustrate additional JBurg features:

  • String literals (introduces the String type)
  • Control flow constructs: if, if/else, and while.
  • Constant-Folded arithmetic (constant-folding, "least cost wins")
  • Use addi instructions for expressions such as x + 1 (cost function)

| Compiler Overview | Front End | Code Generator | Templates |


Related

Wiki: SecondFrontEnd
Wiki: TutorialCompilerTemplates

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.