diff --git a/src/alu.c b/src/alu.c index 6c2964a..a3e51d8 100644 --- a/src/alu.c +++ b/src/alu.c @@ -1031,7 +1031,7 @@ static boolean expect_argument_or_monadic_operator(struct expression *expression register int length; // Read global label (or "NOT") - length = input_read_keyword(); + length = parser_read_keyword(); // Now GotByte = illegal char // Check for NOT. Okay, it's hardcoded, // but so what? Sue me... @@ -1161,7 +1161,7 @@ static void expect_dyadic_operator(struct expression *expression) // Multi-character dyadic operators case '!': // "!=" GetByte(); // eat '!' - if (input_expect('=')) { + if (parser_expect('=')) { op = &ops_not_equal; goto push_dyadic_op; } @@ -1216,7 +1216,7 @@ static void expect_dyadic_operator(struct expression *expression) default: // check string versions of operators if (BYTE_STARTS_KEYWORD(GotByte)) { - input_read_and_lower_keyword(); + parser_read_and_lower_keyword(); // Now GotByte = illegal char // search for tree item if (tree_easy_scan(op_tree, &node_body, GlobalDynaBuf)) { @@ -2542,10 +2542,10 @@ static int parse_expression(struct expression *expression) //result->u.number.val.intval = 0; result->u.number.addr_refs = 0; // make sure no additional (spurious) errors are reported: - input_skip_remainder(); + parser_skip_remainder(); // FIXME - remove this when new function interface gets used: // callers must decide for themselves what to do when expression - // parser returns error (and may decide to call input_skip_remainder) + // parser returns error (and may decide to call parser_skip_remainder) return 1; // error } } diff --git a/src/flow.c b/src/flow.c index abee6aa..1714bd6 100644 --- a/src/flow.c +++ b/src/flow.c @@ -186,7 +186,7 @@ void flow_store_doloop_condition(struct condition *condition, char terminator) return; // seems as if there really *is* a condition, so check for until/while - if (input_read_and_lower_keyword()) { + if (parser_read_and_lower_keyword()) { if (strcmp(GlobalDynaBuf->buffer, "while") == 0) { //condition.invert = FALSE; } else if (strcmp(GlobalDynaBuf->buffer, "until") == 0) { diff --git a/src/global.c b/src/global.c index d27e1af..e62f811 100644 --- a/src/global.c +++ b/src/global.c @@ -199,7 +199,7 @@ static int first_symbol_of_statement(void) { if (statement_flags & SF_FOUND_SYMBOL) { Throw_error("Unknown mnemonic"); - input_skip_remainder(); + parser_skip_remainder(); return FALSE; } statement_flags |= SF_FOUND_SYMBOL; // now there has been one @@ -268,7 +268,7 @@ static void parse_symbol_definition(scope_t scope) // explicit symbol definition (symbol = ) GetByte(); // eat '=' parse_assignment(scope, force_bit, POWER_NONE); - input_ensure_EOS(); + parser_ensure_EOS(); } else { // implicit symbol definition (label) set_label(scope, force_bit, POWER_NONE); @@ -280,7 +280,7 @@ static void parse_symbol_definition(scope_t scope) static void parse_mnemo_or_global_symbol_def(void) { // read keyword and ask current cpu type if it's a mnemonic - if (cpu_current_type->keyword_is_mnemonic(input_read_keyword())) + if (cpu_current_type->keyword_is_mnemonic(parser_read_keyword())) return; // statement has been handled // if we're here, it wasn't a mnemonic, so it can only be a symbol name @@ -404,7 +404,7 @@ void parse_until_eob_or_eof(void) parse_mnemo_or_global_symbol_def(); } else { Throw_error(exception_syntax); // FIXME - include char in error message! - input_skip_remainder(); + parser_skip_remainder(); } } } diff --git a/src/input.c b/src/input.c index 81b9ec9..ca3ff8a 100644 --- a/src/input.c +++ b/src/input.c @@ -346,8 +346,7 @@ char GetByte(void) // This function delivers the next byte from the currently active byte source // in un-shortened high-level format. // This function complains if CHAR_EOS (end of statement) is read. -// TODO - check if return value is actually used -static char GetQuotedByte(void) +static void get_quoted_byte(void) { int from_file; // must be an int to catch EOF @@ -388,11 +387,10 @@ static char GetQuotedByte(void) // now check for end of statement if (GotByte == CHAR_EOS) Throw_error("Quotes still open at end of line."); - return GotByte; } -// Skip remainder of statement, for example on error -void input_skip_remainder(void) +// skip remainder of statement, for example on error +void parser_skip_remainder(void) { // read characters until end-of-statement, but check for quotes, // otherwise this might treat a quoted colon like EOS! @@ -408,9 +406,9 @@ void input_skip_remainder(void) dynabuf_clear(GlobalDynaBuf); } -// Ensure that the remainder of the current statement is empty, for example +// ensure that the remainder of the current statement is empty, for example // after mnemonics using implied addressing. -void input_ensure_EOS(void) // Now GotByte = first char to test +void parser_ensure_EOS(void) // now GotByte = first char to test { SKIPSPACE(); if (GotByte) { @@ -422,7 +420,7 @@ void input_ensure_EOS(void) // Now GotByte = first char to test quote = (GotByte == '\'') ? '"' : '\''; // use single quotes, unless byte is a single quote (then use double quotes) sprintf(buf, "Expected end-of-statement, found %c%c%c instead.", quote, GotByte, quote); Throw_error(buf); - input_skip_remainder(); + parser_skip_remainder(); } } @@ -434,9 +432,9 @@ int input_quoted_to_dynabuf(char closing_quote) //dynabuf_clear(GlobalDynaBuf); // do not clear, caller might want to append to existing contents (TODO - check!) for (;;) { - GetQuotedByte(); + get_quoted_byte(); if (GotByte == CHAR_EOS) - return 1; // unterminated string constant; GetQuotedByte will have complained already + return 1; // unterminated string constant; get_quoted_byte will have complained already if (escaped) { // previous byte was backslash, so do not check for terminator nor backslash @@ -644,7 +642,7 @@ int input_readscopeandsymbolname(scope_t *scope, boolean dotkluge) // character is read. Zero-terminate the string. Return its length (without // terminator). // Zero lengths will produce a "missing string" error. -int input_read_keyword(void) +int parser_read_keyword(void) { int length; @@ -659,7 +657,7 @@ int input_read_keyword(void) // character is read. Zero-terminate the string, then convert to lower case. // Return its length (without terminator). // Zero lengths will produce a "missing string" error. -int input_read_and_lower_keyword(void) +int parser_read_and_lower_keyword(void) { int length; @@ -676,7 +674,7 @@ int input_read_and_lower_keyword(void) // UNIX style to platform style. // Returns nonzero on error. Filename in GlobalDynaBuf, including terminator. // Errors are handled and reported, but caller should call -// input_skip_remainder() then. +// parser_skip_remainder() then. static int read_filename_shared_end(boolean *absolute) { // check length @@ -712,7 +710,7 @@ static int read_filename_shared_end(boolean *absolute) // UNIX style to platform style. // Returns nonzero on error. Filename in GlobalDynaBuf. // Errors are handled and reported, but caller should call -// input_skip_remainder() then. +// parser_skip_remainder() then. int input_read_input_filename(struct filespecflags *flags) { dynabuf_clear(GlobalDynaBuf); @@ -751,7 +749,7 @@ int input_read_input_filename(struct filespecflags *flags) // Try to read a comma, skipping spaces before and after. Return TRUE if comma // found, otherwise FALSE. -int input_accept_comma(void) +int parser_accept_comma(void) { SKIPSPACE(); if (GotByte != ',') @@ -764,7 +762,7 @@ int input_accept_comma(void) // Try to read given character. // If found, eat character and return TRUE. // If not found, throw syntax error and return FALSE. -int input_expect(int chr) +int parser_expect(int chr) { // one caller uses this to read the '=' part of "!=", so // do not call SKIPSPACE() here! @@ -844,7 +842,7 @@ static void default_path_to_pathbuf(void) // UNIX style to platform style. // Returns nonzero on error. Filename in GlobalDynaBuf. // Errors are handled and reported, but caller should call -// input_skip_remainder() then. +// parser_skip_remainder() then. // // this is only used for "!to" and "!sl", i.e. output file names. these // must be given as a literal string, and it should be kept this way. diff --git a/src/input.h b/src/input.h index 7955c89..4047199 100644 --- a/src/input.h +++ b/src/input.h @@ -36,7 +36,8 @@ struct filespecflags { }; -// Constants +// constants + extern const char FILE_READBINARY[]; // Special characters // The program *heavily* relies on CHAR_EOS (end of statement) being 0x00! @@ -48,7 +49,8 @@ extern const char FILE_READBINARY[]; // if the characters above are changed, don't forget to adjust global_byte_flags[]! -// Variables +// variables + extern char GotByte; // last byte read (processed) // name of source file used for resolving relative paths // (i.e. not changed during macro execution): @@ -56,18 +58,18 @@ extern const char *input_plat_pathref_filename; // file name in platform format -// Prototypes +// prototypes // get next byte from currently active byte source in shortened high-level // format. When inside quotes, use input_quoted_to_dynabuf() instead! extern char GetByte(void); -// Skip remainder of statement, for example on error -extern void input_skip_remainder(void); +// skip remainder of statement, for example on error +extern void parser_skip_remainder(void); -// Ensure that the remainder of the current statement is empty, for example +// ensure that the remainder of the current statement is empty, for example // after mnemonics using implied addressing. -extern void input_ensure_EOS(void); +extern void parser_ensure_EOS(void); // read string to dynabuf until closing quote is found // returns 1 on errors (unterminated, escaping error) @@ -104,13 +106,13 @@ extern int input_readscopeandsymbolname(scope_t *scope, boolean dotkluge); // character is read. Zero-terminate the string. Return its length (without // terminator). // Zero lengths will produce a "missing string" error. -extern int input_read_keyword(void); +extern int parser_read_keyword(void); // Clear dynamic buffer, then append to it until an illegal (for a keyword) // character is read. Zero-terminate the string, then convert to lower case. // Return its length (without terminator). // Zero lengths will produce a "missing string" error. -extern int input_read_and_lower_keyword(void); +extern int parser_read_and_lower_keyword(void); // try to read a file name for an input file. // library access by using <...> quoting is allowed. @@ -119,7 +121,7 @@ extern int input_read_and_lower_keyword(void); // UNIX style to platform style. // Returns nonzero on error. Filename in GlobalDynaBuf. // Errors are handled and reported, but caller should call -// input_skip_remainder() then. +// parser_skip_remainder() then. extern int input_read_input_filename(struct filespecflags *flags); // try to read a file name for an output file ("!to" and "!sl" only). @@ -128,19 +130,19 @@ extern int input_read_input_filename(struct filespecflags *flags); // UNIX style to platform style. // Returns nonzero on error. Filename in GlobalDynaBuf. // Errors are handled and reported, but caller should call -// input_skip_remainder() then. +// parser_skip_remainder() then. // FIXME - the name suggests this fn reads "the" output filename, but it only // reads "an" output filename: either symbollist or the real output file. extern int input_read_output_filename(void); // Try to read a comma, skipping spaces before and after. Return TRUE if comma // found, otherwise FALSE. -extern int input_accept_comma(void); +extern int parser_accept_comma(void); // Try to read given character. // If found, eat character and return TRUE. // If not found, throw syntax error and return FALSE. -extern int input_expect(int chr); +extern int parser_expect(int chr); // force input system to return "end of file" on next read // (back end function for "!eof" pseudo opcode) diff --git a/src/macro.c b/src/macro.c index 42fbbd7..4057371 100644 --- a/src/macro.c +++ b/src/macro.c @@ -89,7 +89,7 @@ static int pipe_comma(void) { int result; - result = input_accept_comma(); + result = parser_accept_comma(); if (result) DYNABUF_APPEND(GlobalDynaBuf, ','); return result; @@ -226,7 +226,7 @@ void macro_parse_call(void) // Now GotByte = first char of macro name ALU_any_result(&(arg_table[arg_count].result)); } ++arg_count; - } while (input_accept_comma()); + } while (parser_accept_comma()); } // now arg_table contains the arguments // now GlobalDynaBuf = unused @@ -235,7 +235,7 @@ void macro_parse_call(void) // Now GotByte = first char of macro name search_for_macro(¯o_node, macro_scope, FALSE); if (macro_node == NULL) { Throw_error("Macro not defined (or wrong signature)."); - input_skip_remainder(); + parser_skip_remainder(); } else { // make macro_node point to the macro struct actual_macro = macro_node->body; @@ -282,7 +282,7 @@ void macro_parse_call(void) // Now GotByte = first char of macro name symbol->object = arg_table[arg_count].result; // FIXME - this assignment redefines globals/whatever without throwing errors! } ++arg_count; - } while (input_accept_comma()); + } while (parser_accept_comma()); } // and now, finally, parse the actual macro body @@ -303,7 +303,7 @@ void macro_parse_call(void) // Now GotByte = first char of macro name if (outer_msg_sum != pass.warning_count + pass.error_count) Throw_warning("...called from here."); - input_ensure_EOS(); + parser_ensure_EOS(); } ++sanity.macro_recursions_left; // leave this nesting level } diff --git a/src/mnemo.c b/src/mnemo.c index 1e10dc2..dded144 100644 --- a/src/mnemo.c +++ b/src/mnemo.c @@ -542,7 +542,7 @@ static struct ronode mnemo_m65_tree[] = { // TODO: add pointer arg for result, use return value to indicate parse error! static int get_index(void) { - if (!input_accept_comma()) + if (!parser_accept_comma()) return INDEX_NONE; // there was a comma, so check next character (spaces will have been skipped): @@ -614,7 +614,7 @@ static bits get_addr_mode(struct number *result) GetByte(); // eat '[' get_int_arg(result, FALSE); typesystem_want_addr(result); - if (input_expect(']')) { + if (parser_expect(']')) { address_mode_bits = AMB_LONGINDIRECT | AMB_INDEX(get_index()); } break; @@ -630,7 +630,7 @@ static bits get_addr_mode(struct number *result) // in case there are still open parentheses, // read internal index address_mode_bits |= AMB_PREINDEX(get_index()); - if (input_expect(')')) { + if (parser_expect(')')) { // fn already does everything for us! } } @@ -638,7 +638,7 @@ static bits get_addr_mode(struct number *result) address_mode_bits |= AMB_INDEX(get_index()); } // ensure end of line - input_ensure_EOS(); + parser_ensure_EOS(); //printf("AM: %x\n", address_mode_bits); return address_mode_bits; } @@ -781,7 +781,7 @@ static void group_only_implied_addressing(int opcode) Throw_warning("Found SED instruction for CPU with known decimal SBC bug."); } output_byte(opcode); - input_ensure_EOS(); + parser_ensure_EOS(); } // helper function to output "Target not in bank" message @@ -825,7 +825,7 @@ static void near_branch(int preoffset) // so use output_byte() instead of output_8() //output_8(offset); output_byte(offset); - input_ensure_EOS(); + parser_ensure_EOS(); } // helper function for relative addressing with 16-bit offset @@ -847,7 +847,7 @@ static void far_branch(int preoffset) } } output_le16(offset); - input_ensure_EOS(); + parser_ensure_EOS(); } // set addressing mode bits depending on which opcodes exist, then calculate @@ -1044,7 +1044,7 @@ static void group_bbr_bbs(int opcode) get_int_arg(&zpmem, TRUE); typesystem_want_addr(&zpmem); - if (input_expect(',')) { + if (parser_expect(',')) { output_byte(opcode); output_byte(zpmem.val.intval); near_branch(3); @@ -1079,7 +1079,7 @@ static void group_mvn_mvp(int opcode) get_int_arg(&source, TRUE); typesystem_want_nonaddr(&source); // get comma - if (!input_expect(',')) { + if (!parser_expect(',')) { return; } SKIPSPACE(); @@ -1097,7 +1097,7 @@ static void group_mvn_mvp(int opcode) // sanity check if (unmatched_hash) Throw_error(exception_syntax); // FIXME - maybe "Use ARG,ARG or #ARG,#ARG but do not mix and match"? - input_ensure_EOS(); + parser_ensure_EOS(); } // "rmb0..7" and "smb0..7" @@ -1110,7 +1110,7 @@ static void group_only_zp(int opcode) typesystem_want_addr(&target); output_byte(opcode); output_8(target.val.intval); - input_ensure_EOS(); + parser_ensure_EOS(); } // NOP on m65 cpu (FIXME - "!align" outputs NOPs, what about that? what if user writes NEG:NEG?) diff --git a/src/pseudoopcodes.c b/src/pseudoopcodes.c index a080ab7..80bf556 100644 --- a/src/pseudoopcodes.c +++ b/src/pseudoopcodes.c @@ -102,10 +102,10 @@ static enum eos po_to(void) config.output_filename = dynabuf_get_copy(GlobalDynaBuf); // select output format - if (input_accept_comma()) { + if (parser_accept_comma()) { // parse output format name // if no keyword given, give up - if (input_read_and_lower_keyword() == 0) + if (parser_read_and_lower_keyword() == 0) return SKIP_REMAINDER; format = outputformat_find(); @@ -228,7 +228,7 @@ static enum eos iterate(void (*fn)(intval_t)) do { ALU_any_result(&object); output_object(&object, &iter); - } while (input_accept_comma()); + } while (parser_accept_comma()); return ENSURE_EOS; } @@ -427,7 +427,7 @@ static enum eos po_convtab(void) // expect keyword: either one of the pre-defined encodings or // "file" with a filename argument: - if (input_read_and_lower_keyword() == 0) + if (parser_read_and_lower_keyword() == 0) return SKIP_REMAINDER; // "No string given" error has already been thrown // now check for known keywords: @@ -442,7 +442,7 @@ static enum eos po_convtab(void) if (strcmp(GlobalDynaBuf->buffer, "file") == 0) { SKIPSPACE(); - if (!input_expect('=')) { + if (!parser_expect('=')) { return SKIP_REMAINDER; } return use_encoding_from_file(); @@ -492,7 +492,7 @@ static enum eos encode_string(const struct encoder *inner_encoder, unsigned char ALU_any_result(&object); output_object(&object, &iter); } - } while (input_accept_comma()); + } while (parser_accept_comma()); encoder_current = outer_encoder; // reactivate buffered encoder return ENSURE_EOS; } @@ -522,7 +522,7 @@ static enum eos po_scrxor(void) intval_t xor; ALU_any_int(&xor); - if (input_expect(',')) { + if (parser_expect(',')) { return encode_string(&encoder_scr, xor); } return SKIP_REMAINDER; @@ -551,7 +551,7 @@ static enum eos po_binary(void) return SKIP_REMAINDER; // read optional arguments - if (input_accept_comma()) { + if (parser_accept_comma()) { // any size given? if ((GotByte != ',') && (GotByte != CHAR_EOS)) { // then parse it @@ -560,7 +560,7 @@ static enum eos po_binary(void) Throw_serious_error(exception_negative_size); } // more? - if (input_accept_comma()) { + if (parser_accept_comma()) { // any skip given? if (GotByte != CHAR_EOS) { // then parse it @@ -614,7 +614,7 @@ static enum eos po_fill(void) intval_t fill = FILLVALUE_FILL; ALU_defined_int(&sizeresult); // FIXME - forbid addresses! - if (input_accept_comma()) + if (parser_accept_comma()) ALU_any_int(&fill); // FIXME - forbid addresses! while (sizeresult.val.intval--) output_8(fill); @@ -650,11 +650,11 @@ static enum eos po_align(void) // now: "!align ANDVALUE, EQUALVALUE [,FILLVALUE]" // in future: "!align BLOCKSIZE" where block size must be a power of two ALU_defined_int(&andresult); // FIXME - forbid addresses! - if (input_expect(',')) { + if (parser_expect(',')) { // fn already does everything for us } ALU_defined_int(&equalresult); // ...allow addresses (unlikely, but possible) - if (input_accept_comma()) + if (parser_accept_comma()) ALU_any_int(&fill); else fill = cpu_current_type->default_align_value; @@ -698,9 +698,9 @@ static enum eos po_pseudopc(void) ALU_defined_int(&new_pc); // FIXME - allow for undefined! (complaining about non-addresses would be logical, but annoying) /* TODO - add this. check if code can be shared with "*="! // check for modifiers - while (input_accept_comma()) { + while (parser_accept_comma()) { // parse modifier. if no keyword given, give up - if (input_read_and_lower_keyword() == 0) + if (parser_read_and_lower_keyword() == 0) return SKIP_REMAINDER; if (strcmp(GlobalDynaBuf->buffer, "limit") == 0) { @@ -754,7 +754,7 @@ static enum eos po_cpu(void) const struct cpu_type *cpu_buffer = cpu_current_type; // remember const struct cpu_type *new_cpu_type; - if (input_read_and_lower_keyword()) { + if (parser_read_and_lower_keyword()) { new_cpu_type = cputype_find(); if (new_cpu_type) cpu_current_type = new_cpu_type; // activate new cpu type @@ -827,7 +827,7 @@ static enum eos po_set(void) // now GotByte = illegal char return SKIP_REMAINDER; // zero length force_bit = parser_get_force_bit(); // skips spaces after - if (!input_expect('=')) + if (!parser_expect('=')) return SKIP_REMAINDER; // TODO: in versions before 0.97, force bit handling was broken in both @@ -859,7 +859,7 @@ static enum eos po_zone(void) if (BYTE_CONTINUES_KEYWORD(GotByte)) { // because we know of one character for sure, // there's no need to check the return value. - input_read_keyword(); + parser_read_keyword(); new_title = dynabuf_get_copy(GlobalDynaBuf); allocated = TRUE; } @@ -989,7 +989,7 @@ static enum eos ifelse(enum ifmode mode) return AT_EOS_ANYWAY; // normal exit if there is no ELSE {...} block // read keyword (expected to be "else") - if (input_read_and_lower_keyword() == 0) + if (parser_read_and_lower_keyword() == 0) return SKIP_REMAINDER; // "missing string error" -> ignore rest of line // make sure it's "else" @@ -1006,7 +1006,7 @@ static enum eos ifelse(enum ifmode mode) } // read keyword (expected to be if/ifdef/ifndef) - if (input_read_and_lower_keyword() == 0) + if (parser_read_and_lower_keyword() == 0) return SKIP_REMAINDER; // "missing string error" -> ignore rest of line // which one is it? @@ -1061,12 +1061,12 @@ static enum eos po_for(void) // now GotByte = illegal char // now GotByte = illegal char force_bit = parser_get_force_bit(); // skips spaces after loop.symbol = symbol_find(scope); // if not number, error will be reported on first assignment - if (input_accept_comma()) { + if (parser_accept_comma()) { // counter syntax (old or new) loop.u.counter.force_bit = force_bit; ALU_defined_int(&intresult); // read first argument loop.u.counter.addr_refs = intresult.addr_refs; - if (input_accept_comma()) { + if (parser_accept_comma()) { // new counter syntax loop.algorithm = FORALGO_NEWCOUNT; if (config.dialect < V0_94_12__NEW_FOR_SYNTAX) { @@ -1120,9 +1120,9 @@ was just a typo. if the current byte is '.' or '-' or whatever, then trying to read a keyword will result in "No string given" - which is confusing for the user if they did not even want to put a string there. so if the current byte is not the start of "in" we just throw a syntax error. -knowing there is an "i" also makes sure that input_read_and_lower_keyword() +knowing there is an "i" also makes sure that parser_read_and_lower_keyword() does not fail. */ - input_read_and_lower_keyword(); + parser_read_and_lower_keyword(); if (strcmp(GlobalDynaBuf->buffer, "in") != 0) { Throw_error(exception_want_IN_or_comma); return SKIP_REMAINDER; // FIXME - this ignores '{' and will then complain about '}' @@ -1238,7 +1238,7 @@ static enum eos tracewatch(boolean enter_monitor) if (GotByte != CHAR_EOS) { do { // parse flag. if no keyword given, give up - if (input_read_and_lower_keyword() == 0) + if (parser_read_and_lower_keyword() == 0) return SKIP_REMAINDER; // fail (error has been reported) if (strcmp(GlobalDynaBuf->buffer, "load") == 0) { @@ -1251,7 +1251,7 @@ static enum eos tracewatch(boolean enter_monitor) Throw_error("Unknown flag (known are: load, store, exec)."); // FIXME - add to docs! return SKIP_REMAINDER; } - } while (input_accept_comma()); + } while (parser_accept_comma()); } // shortcut: no flags at all -> set all flags! if (!flags) @@ -1349,7 +1349,7 @@ static enum eos throw_src_string(enum debuglevel level, const char prefix[]) ALU_any_result(&object); object.type->print(&object, user_message); } - } while (input_accept_comma()); + } while (parser_accept_comma()); dynabuf_append(user_message, '\0'); throw_message(level, user_message->buffer, NULL); return ENSURE_EOS; @@ -1361,7 +1361,7 @@ static enum eos po_debug(void) struct number debuglevel; ALU_defined_int(&debuglevel); - if (!input_expect(',')) + if (!parser_expect(',')) return SKIP_REMAINDER; // drop this one? @@ -1400,7 +1400,7 @@ static enum eos po_serious(void) // end of source file ("!endoffile" or "!eof") static enum eos po_endoffile(void) { - input_ensure_EOS(); // make sure there are no args + parser_ensure_EOS(); // make sure there are no args input_force_eof(); // fake end of file return AT_EOS_ANYWAY; } @@ -1495,7 +1495,7 @@ void pseudoopcode_parse(void) // now GotByte = '!' (or '.' in case of --fullstop GetByte(); // read next byte // on missing keyword, return (complaining will have been done) - if (input_read_and_lower_keyword()) { + if (parser_read_and_lower_keyword()) { // search for tree item if ((tree_easy_scan(pseudo_opcode_tree, &node_body, GlobalDynaBuf)) && node_body) { @@ -1508,9 +1508,9 @@ void pseudoopcode_parse(void) // now GotByte = '!' (or '.' in case of --fullstop } } if (then == SKIP_REMAINDER) - input_skip_remainder(); + parser_skip_remainder(); else if (then == ENSURE_EOS) - input_ensure_EOS(); + parser_ensure_EOS(); // the other two possibilities (PARSE_REMAINDER and AT_EOS_ANYWAY) // will lead to the remainder of the line being parsed by the mainloop. } @@ -1526,14 +1526,14 @@ void notreallypo_setpc(void) // GotByte is '*' // next non-space must be '=' NEXTANDSKIPSPACE(); - if (!input_expect('=')) + if (!parser_expect('=')) goto fail; ALU_defined_int(&intresult); // read new address // check for modifiers - while (input_accept_comma()) { + while (parser_accept_comma()) { // parse modifier. if no keyword given, give up - if (input_read_and_lower_keyword() == 0) + if (parser_read_and_lower_keyword() == 0) goto fail; if (strcmp(GlobalDynaBuf->buffer, "overlay") == 0) { @@ -1584,9 +1584,9 @@ void notreallypo_setpc(void) // GotByte is '*' if (do_outfilestart) po_outfilestart(); - input_ensure_EOS(); + parser_ensure_EOS(); return; fail: - input_skip_remainder(); + parser_skip_remainder(); } diff --git a/src/version.h b/src/version.h index d7ebce5..c774940 100644 --- a/src/version.h +++ b/src/version.h @@ -9,7 +9,7 @@ #define RELEASE "0.97" // update before release FIXME #define CODENAME "Zem" // update before release -#define CHANGE_DATE "28 Jul" // update before release FIXME +#define CHANGE_DATE "29 Jul" // update before release FIXME #define CHANGE_YEAR "2024" // update before release //#define HOME_PAGE "http://home.pages.de/~mac_bacon/smorbrod/acme/" #define HOME_PAGE "http://sourceforge.net/p/acme-crossass/" // FIXME