コード例 #1
0
ファイル: lex.c プロジェクト: EtchedPixels/FUZIX
/**
 * enforces bracket
 * @param str
 * @return 
 */
void needbrack(char *str) {
    if (!match (str)) {
        error ("missing bracket");
        gen_comment ();
        output_string (str);
        newline ();
    }
}
コード例 #2
0
ファイル: error.c プロジェクト: JamesLinus/FUZIX
void doerror(char *ptr)
{
        int k;
        gen_comment ();
        output_string (line);
        newline ();
        gen_comment ();
        k = 0;
        while (k < lptr) {
                if (line[k] == 9)
                        print_tab ();
                else
                        output_byte (' ');
                k++;
        }
        output_byte ('^');
        newline ();
        gen_comment ();
        output_string ("******  ");
        output_string (ptr);
        output_string ("  ******");
        newline ();
}
コード例 #3
0
ファイル: main.c プロジェクト: JamesLinus/FUZIX
/**
 * report errors
 */
void errorsummary(void) {
    if (ncmp)
        error("missing closing bracket");
    newline();
    gen_comment();
    output_decimal(errcnt);
    if (errcnt) errfile = YES;
    output_string(" error(s) in compilation");
    newline();
    gen_comment();
    output_with_tab("literal pool:");
    output_decimal(litptr);
    newline();
    gen_comment();
    output_with_tab("global pool:");
    output_decimal(global_table_index - rglobal_table_index);
    newline();
    gen_comment();
    output_with_tab("Macro pool:");
    output_decimal(macptr);
    newline();
    if (errcnt > 0)
        pl("Error(s)");
}
コード例 #4
0
ファイル: sym.c プロジェクト: EtchedPixels/FUZIX
/**
 * print error message
 * @param symbol_name
 * @return 
 */
void multidef(char *symbol_name) {
    error ("already defined");
    gen_comment ();
    output_string (symbol_name);
    newline ();
}