示例#1
0
static void
getvar(const char *name)
{
    Symbol *symbol = apex_getsymbol(name);

    if (symbol == NULL) {
        apex_error("undefined variable: '%s'", name);
        return;
    }

    apex_addop(OP_VAR, symbol->offset);
}
示例#2
0
Uint 
apex_loadfile(const char *path)
{
    yyin = fopen(path, "r");

    if (yyin == NULL) {
        apex_error("failed to read '%s'", path);
        return 0;
    }

    return 1;
}
示例#3
0
void 
yyerror(char *message)
{
    apex_error("%s: unexpeced '%s'", message, yytext);
    parse_error = 1;
}