Author Topic: Would a "higher level" AGI compiler be useful?  (Read 26850 times)

0 Members and 1 Guest are viewing this topic.

Offline Nick Sonneveld

Re:Would a "higher level" AGI compiler be useful?
« Reply #75 on: August 09, 2002, 01:41:09 AM »
I'm getting there.. I'm chewing through the "dragon book" (Compilers: Principles, Techniques and Tools) which is apparently pretty good.  It's easier to understand than the other book I own on compilers (Compilers for Java.. not the best thing if you want to make one in C) :)

The problem isn't just implementing a compiler for the current syntax.. it's implementing it and keeping room for a new syntax as well.

I think the steps to go are:
- compiler for current syntax
- compiler for new syntax
- implement new commands, extra variable space..

or maybe the other way round.. implement commands for sorely needed features and then the new syntax.

- Nick
Nick Sonneveld  |  AGI Dev  |  NAGI

Offline Brian Provinciano

Re:Would a "higher level" AGI compiler be useful?
« Reply #76 on: August 09, 2002, 03:44:00 AM »
Creating my SCI compiler:

I practiced by making some test assemblers and such before making the SCI compiler (it's always good to do drafts and it got me farmiliar with the file format). When it came time to make the final SCI compiler for SCI Studio, I planned it out on regular lined paper for a couple weeks before sitting down and coding it. By the time I was done planning and pseudocoding, I started the actual coding, and it came along quite easily and quickly. I've also been able to greatly expand it to not only support much more language and features, but also target mutiple SCI versions (all from planning).

I've learned over the years  that just like writing a good adventure game, building a large or complex program invlovles full planning first as well.

Just as a note, I think it works best to do the planning by hand on paper rather than on the computer in notepad or Word. That way, it's quicker, easier, and any chance I can get to rest my eyes from the computer screen and neck from the chair, yet still be working on SCI Studio is ideal!

Offline Nick Sonneveld

Re:Would a "higher level" AGI compiler be useful?
« Reply #77 on: August 09, 2002, 04:06:59 AM »
don't worry, I understand the value of design before leaping into programming.  A lot of NAGI was designed that way.  I've still got sheets of paper where I wrote down some quick notes or drafted how it worked.  You can draw big meaty lines between functions.. very tricky to do on a computer unless you're using publisher.

I don't think any major project can be written without some preplanning.  Even if you do manage without it, it might be a mess or had to extend later on.

Believe it or not, an assembler for agi logic exists.  The Russian AGDS group hacked together a version of MASM to generate the code.

- Nick
Nick Sonneveld  |  AGI Dev  |  NAGI

Offline df

Re:Would a "higher level" AGI compiler be useful?
« Reply #78 on: August 09, 2002, 02:54:48 PM »
I had one in nasm. hard coded opcodes done. each opcode was a macro, so it calced jumps and loops correctly :) hard to debug ;) but it worked!! just more crap never recovered from the hd crash that nearly killed yggdrasil v0.something... heh... :)


SMF 2.0.19 | SMF © 2021, Simple Machines
Simple Audio Video Embedder

Page created in 0.038 seconds with 22 queries.