Category : C Source Code
Archive   : INFERENG.ZIP
Filename : RULECOMP.STR

 
Output of file : RULECOMP.STR contained in archive : INFERENG.ZIP

/*
Pseudo code for the rule compiler :

compile_rules(rule_file,output_compile_file)
{
OPEN rule_file ;
WHILE ( EOF in rule_file NOT reached )
{
locate keyword
IF ( keyword not located on line and line not blank )
{
OUTPUT error message to user telling of problem
}
place flag associated with keyword into rule section
IF (following string is in string section)
{
place the address of the string into the rule section
}
ELSE
{
place the string into the string section (0 delimit)
place the address of the string into the rule section
}
IF ( the keyword is a THEN or THENHYP )
{
place and additional IF flag and a zeroed
pointer in the rule section
place address of hypothesis or then clause into
hypstack section
}
}
IF (last keyword not of a "HYP" type )
{
OUTPUT warning to user about this being a problem
}
place two successive IF flags - zeroed pointer into the rule section
to mark the end of the rules section.
CLOSE rule_file
OPEN compile_output_file
OUTPUT number of bytes in rule section to compile_output_file
COPY rule section to compile_output_file
OUTPUT number of bytes in string section to compile_output_file
COPY string section to compile_output_file
CLOSE compile_output_file
}
*/


  3 Responses to “Category : C Source Code
Archive   : INFERENG.ZIP
Filename : RULECOMP.STR

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/