# HG changeset patch # User lost # Date 1253060946 0 # Node ID c8bcc396ec595a97a7e670565537cad735dd4e8e # Parent f9f01a499525102152da6d47f04e91be23c2e976 Allow symbols to appear after whitespace when terminated by : diff -r f9f01a499525 -r c8bcc396ec59 ChangeLog --- a/ChangeLog Tue Sep 15 03:16:17 2009 +0000 +++ b/ChangeLog Wed Sep 16 00:29:06 2009 +0000 @@ -17,6 +17,8 @@ without an actual external reference - a zero-width external reference so to speak [LWASM,LWLINK] [+] Decode known incomplete expression flags [LWOBJDUMP] +[+] Allow symbol to appear after whitespace if specified with a trailing : + to improve compatibility with gcc6809 output [LWASM] [b] Treat incomplete reference flags as specified in docs [LWLINK] Version 2.5 diff -r f9f01a499525 -r c8bcc396ec59 lwasm/parse.c --- a/lwasm/parse.c Tue Sep 15 03:16:17 2009 +0000 +++ b/lwasm/parse.c Wed Sep 16 00:29:06 2009 +0000 @@ -70,6 +70,7 @@ return; // if we start with a non-space character, it's a symbol +symbolagain: if (!isspace(*p)) { // we have a symbol specified here @@ -113,6 +114,12 @@ memcpy(opc, p, p2 - p); opc[p2 - p] = '\0'; + if (strchr(opc, ':')) + { + lwasm_free(opc); + goto symbolagain; + } + l -> forceglobal = 0; // if the opcode contains an =, treat it as "symbol = expr" if (!sym && strchr(opc, '='))