Close

Project Status Update

A project log for Prometheus A.I.

One set of rings that will control all.

glgormanglgorman 07/14/2022 at 12:210 Comments

I have posted pdf versions of the project description, details, and project logs in the files section of this project, along with a pdf version of the original source code for the UCSD p-system compiler for a more pleasant reading.  So much more fun if you are viewing with a tablet.  Additional source files are available on GitHub and in standard form and will be regularly updated as things continue to make progress.

I read that CP/M has now been officially liberated.  So now it might be worthwhile to consider adding CP/M compatibility, instead of the original UCSD p-system file system.  Lots to do.

In the meantime: Enjoy!

I think I will completely rewrite the tokenizing function INSYMBOL even further, so as to, hopefully, completely eliminate all case statements, which of course get replaced with switch statements in C/C++.  Doesn't this look much nicer?

namespace pascal0
{
key_info operators[] = 
{
	key_info(":=",BECOMES,NOOP),
	key_info("(*",COMMENTSY,NOOP),
	key_info("{",COMMENTSY,NOOP),
	key_info("*)",SEPARATSY,NOOP),
	key_info("}",SEPARATSY,NOOP),
	key_info("<>",RELOP,NEOP),
	key_info(">=",RELOP,GEOP),
	key_info("<=",RELOP,LEOP),
	key_info("..",COLON,NOOP),
	key_info(".",PERIOD,NOOP),
	key_info(":",COLON,NOOP),
	key_info(";",SEMICOLON,NOOP),
	key_info("^",ARROW,NOOP),
	key_info("[",LBRACK,NOOP),
	key_info("]",RBRACK,NOOP),
	key_info("(",LPARENT,NOOP),
	key_info(")",RPARENT,NOOP),
	key_info(",",COMMA,NOOP),
	key_info("+",ADDOP,PLUS),
	key_info("-",ADDOP,MINUS),
	key_info("*",MULOP,MUL),
	key_info("/",MULOP,RDIV),
	key_info("=",RELOP,EQOP),
	key_info(">",RELOP,GTOP),	
	key_info("<",RELOP,LTOP),
	key_info("\'",STRINGCONST,NOOP),
	key_info("",OTHERSY,NOOP),
};
};

And thus another long chain of case statements bites the dust. 

Discussions