void fatalError(errorType theError, ...) { va_list ap; va_start(ap, theError); printErrorMessage(theError, ap); va_end(ap); chokePukeAndDie(); }
void botch(char *message, ...) { va_list ap; printf("Macross horrible terrible internal botch: "); va_start(ap, message); vprintf(message, ap); va_end(ap); chokePukeAndDie(); }
addressType evaluateBuiltinFunctionCall(void) { int theFunction; int argCount; theFunction = getNumber(); nextByte(argCount); if (theFunction<0 || MAX_FUNCTIONS<=theFunction) { printf("illegal built-in function #%d\n", theFunction); chokePukeAndDie(); } return((*builtInFunctionTable[theFunction].functionEntry)(argCount)); }
main(int argc, char **argv) { #ifdef __APPLE__ char end = get_end(); #else extern char end; #endif char *sbrk(int); fflush(stdout); initializeStuff(argc, argv); yyparse(); finishUp(); if (emitPrint) printf("storage high water mark 0x%x == %d\n", sbrk(0) - &end, sbrk(0) - &end); if (errorFlag) chokePukeAndDie(); else exit(0); }
addressType evaluateExpression(void) { if (pc == NULL) return(0); switch (*pc++) { case IDENTIFIER_TAG: return(evaluateSymbol()); case FUNCTION_CALL_TAG: return(evaluateFunctionCall()); case BUILTIN_FUNCTION_CALL_TAG: return(evaluateBuiltinFunctionCall()); case NUMBER_TAG: return(evaluateNumber()); case RELOCATABLE_TAG: return(evaluateRelocatableNumber()); case CONDITION_CODE_TAG: return(evaluateConditionCode()); case SUBEXPRESSION_TAG: return(evaluateExpression()); case UNOP_TAG: return(evaluateUnop()); case BINOP_TAG: return(evaluateBinop()); case PREOP_TAG: return(evaluatePreop()); case POSTOP_TAG: return(evaluatePostop()); case HERE_TAG: return(evaluateHere()); case STRING_TAG: return(evaluateString()); case ARRAY_TAG: return(evaluateArray()); case VALUE_TAG: return(evaluateNumber()); case NULL_TAG: return(0); case BLOCK_TAG: return(evaluateBlock()); case MDEFINE_TAG: return(evaluateMdefine()); case MVARIABLE_TAG: return(evaluateMvariable()); case MIF_TAG: return(evaluateMif()); case MFOR_TAG: return(evaluateMfor()); case MWHILE_TAG: return(evaluateMwhile()); case MDOWHILE_TAG: return(evaluateMdoWhile()); case MDOUNTIL_TAG: return(evaluateMdoUntil()); case PERFORM_TAG: return(evaluatePerform()); case GROUP_TAG: return(evaluateBlock()); case ASSERT_TAG: return(evaluateAssert()); case MSWITCH_TAG: return(evaluateMswitch()); case CLAUSE_TAG: error(CLAUSE_AT_TOP_LEVEL_ERROR); chokePukeAndDie(); case FRETURN_TAG: return(evaluateFreturn()); case END_TAG: return(0); } }