Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Other Discussions
  3. IT & Infrastructure
  4. Resources needed: the theory and practice of OO compiler design

Resources needed: the theory and practice of OO compiler design

Scheduled Pinned Locked Moved IT & Infrastructure
cssdesigngame-devworkspace
1 Posts 1 Posters 3 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    Gregory Gadow
    wrote on last edited by
    #1

    For some years, I have been working on an object-oriented language for writing simulations similar to Life[^]. I would now like to try my hand at designing a compiler and framework for running the language. TLC (Tiny Life Compiler) is broken into sections like COBOL, each representing a different phase of the simulation: environment, initialization, loop and final. In the environment section, different lifeforms can be defined by writing classes that inherit from the base LIFEFORM object or a class descended from it. Other aspects of the simulation, such as the type of grid (square or hex) and the behavior of the edges (are opposite edges joined or not), are defined there too. The initialization section is where starting states are set up; each generation is a single pass through the loop section which runs until an EXIT command is executed; and the final section is where summary information can be presented. It would run basically as a console, with just an output display and very basic keyboard commands like "Press Enter to begin" and "Press any key to pause." The source code would be compiled to an optimized pseudocode, which would be run by an interpreter. I've written procedural language compilers before, so I'm familiar with the concept. I've never written an object-oriented one, though, and I'm not sure how the pseudocode would be arranged. If anyone has any recommended books or other resources, I would be grateful.

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups