xa_asm: fixed parsing of symbols used with DS directive in BSEG (pass 2&3).
authorpjs <pjs@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Tue, 22 Jan 2002 02:23:40 +0000 (02:23 +0000)
committerpjs <pjs@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Tue, 22 Jan 2002 02:23:40 +0000 (02:23 +0000)
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@1833 4a8a32a2-be11-0410-ad9d-d568d2c75423

as/xa51/xa_asm.l
as/xa51/xa_asm.y
as/xa51/xa_dasm.c
as/xa51/xa_main.c

index fa188b3f26d5a27577f6306dfbf4ecc97e3165fc..61fdaf63d32ab454da0abeddd4aa3d7b8a704045 100644 (file)
@@ -5,7 +5,7 @@
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; version 2.
  *
- * Foobar is distributed in the hope that it will be useful,
+ * Paul's XA51 Assembler is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
index 339b750915da8e6fccad8292a3c589f03ab64532..4567d7e33ca9c36fd0f48d6b43191bc9714dcfb2 100644 (file)
@@ -5,7 +5,7 @@
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; version 2.
  *
- * Foobar is distributed in the hope that it will be useful,
+ * Paul's XA51 Assembler is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
@@ -182,7 +182,7 @@ directive:     '.' ORG expr {
 db_directive:  DB {db_count = 0;}
 
 
-linesymbol:    WORD  { 
+linesymbol:    normal_or_bit_symbol  { 
                        strcpy(symbol_name, lex_sym_name);
                        if (!strchr(lex_sym_name, ':')) {
                                /* non-local label, remember base name */
@@ -191,6 +191,9 @@ linesymbol:    WORD  {
                        if (is_target(symbol_name)) pad_with_nop();
                }
 
+normal_or_bit_symbol: WORD {$$ = $1;}
+               | BIT {$$ = $1;}
+
 bytes:           byte_element
                | bytes ',' byte_element
 
index de055f02e512de439484d9466747244ef5aa6d9a..b7d598bc40b32bb73aff65c2eb39e8bf509804d3 100644 (file)
@@ -4,7 +4,7 @@
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; version 2.
  *
- * Foobar is distributed in the hope that it will be useful,
+ * Paul's XA51 Assembler is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
index f632f562ae3ae221da817447016cdee20e5bd315..b01f829485860a575c2e7566dbce560449b6d09a 100644 (file)
 /* adapted from the osu8asm project, 1995 */
 /* http://www.pjrc.com/tech/osu8/index.html */
 
-#define printf(x...) fprintf(stderr,x)
 
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 
+#define printf(x...) fprintf(stderr,x)
+
 #include "xa_main.h"
 
 extern void yyrestart(FILE *new_file);