[Z88dk-commits] CVS: z88dk/src/z80asm/t expr.t, 1.5, 1.6 whitebox-sc

Bridge to the z88dk-commits mailing list
Post Reply
pauloscustodio

[Z88dk-commits] CVS: z88dk/src/z80asm/t expr.t, 1.5, 1.6 whitebox-sc

Post by pauloscustodio »

Update of /cvsroot/z88dk/z88dk/src/z80asm/t
In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv21183/t

Modified Files:
expr.t whitebox-scan.t
Log Message:
BUG_0044: binary constants with more than 8 bits not accepted
CH_0022: Added syntax to define binary numbers as bitmaps
Replaced tokenizer with Ragel based scanner.
Simplified scanning code by using ragel instead of hand-built scanner
and tokenizer.
Removed 'D' suffix to signal decimal number.
Parse AF' correctly.
Decimal numbers expressed as sequence of digits, e.g. 1234.
Hexadecimal numbers either prefixed with '0x' or '$' or suffixed with 'H',
in which case they need to start with a digit, or start with a zero,
e.g. 0xFF, $ff, 0FFh.
Binary numbers either prefixed with '0b' or '@', or suffixed with 'B',
e.g. 0b10101, @10101, 10101b.

Index: expr.t
===================================================================
RCS file: /cvsroot/z88dk/z88dk/src/z80asm/t/expr.t,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** expr.t 11 Mar 2014 00:15:13 -0000 1.5
--- expr.t 29 Mar 2014 00:33:29 -0000 1.6
***************
*** 27,32 ****
unlink_testfiles();

- diag "Should accept binary constant longer than 8 bits";
-
my($COMMA, $AND, $XOR, $NOT, $POWER) = get_legacy() ?
('&', '~', ':', '0xFF :', '^' ) :
--- 27,30 ----
***************
*** 41,46 ****
["defw #label_1;comment", "\x02\x00"],
["defw #ZERO+label_1;comment", "\x02\x00"],
! ["defb 255,128D", "\xFF\x80"],
! ["defb ZERO+255,ZERO+128D", "\xFF\x80"],
["defb \$FF,0xFE,0BEH,0ebh", "\xFF\xFE\xBE\xEB"],
["defb ZERO+\$FF,ZERO+0xFE,ZERO+0BEH,ZERO+0ebh",
--- 39,44 ----
["defw #label_1;comment", "\x02\x00"],
["defw #ZERO+label_1;comment", "\x02\x00"],
! ["defb 255,128", "\xFF\x80"],
! ["defb ZERO+255,ZERO+128", "\xFF\x80"],
["defb \$FF,0xFE,0BEH,0ebh", "\xFF\xFE\xBE\xEB"],
["defb ZERO+\$FF,ZERO+0xFE,ZERO+0BEH,ZERO+0ebh",
***************
*** 48,51 ****
--- 46,52 ----
["defb \@1010,1010B", "\x0A\x0A"],
["defb ZERO+\@1010,ZERO+1010B", "\x0A\x0A"],
+ ['defw @"####---###--##-#"', "\xCD\xF1"], # BUG_0044
+ ['defw @01111000111001101 ', "\xCD\xF1"], # BUG_0044
+ ['defl @"#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-"', "\xAA\xAA\xAA\xAA"], # BUG_0044
["defm \"hello\"${COMMA}32,\"\",\"world\"", "hello world"],
["defm \"hello\"${COMMA}ZERO+32,\"\",\"world\"", "hello world"],
***************
*** 117,120 ****
--- 118,129 ----
["defb ---+--+-2", "\2"],
["EACH:DJNZ EACH", "\x10\xFE"], # CH_0021
+ ['defb @"--------"', "\x00"], # CH_0022
+ ['defb @"---##---"', "\x18"], # CH_0022
+ ['defb @"--#--#--"', "\x24"], # CH_0022
+ ['defb @"-#----#-"', "\x42"], # CH_0022
+ ['defb @"-######-"', "\x7E"], # CH_0022
+ ['defb @"-#----#-"', "\x42"], # CH_0022
+ ['defb @"-#----#-"', "\x42"], # CH_0022
+ ['defb @"--------"', "\x00"], # CH_0022
);

***************
*** 218,221 ****
--- 227,245 ----

# $Log$
+ # Revision 1.6 2014/03/29 00:33:29 pauloscustodio
+ # BUG_0044: binary constants with more than 8 bits not accepted
+ # CH_0022: Added syntax to define binary numbers as bitmaps
+ # Replaced tokenizer with Ragel based scanner.
+ # Simplified scanning code by using ragel instead of hand-built scanner
+ # and tokenizer.
+ # Removed 'D' suffix to signal decimal number.
+ # Parse AF' correctly.
+ # Decimal numbers expressed as sequence of digits, e.g. 1234.
+ # Hexadecimal numbers either prefixed with '0x' or '$' or suffixed with 'H',
+ # in which case they need to start with a digit, or start with a zero,
+ # e.g. 0xFF, $ff, 0FFh.
+ # Binary numbers either prefixed with '0b' or '@', or suffixed with 'B',
+ # e.g. 0b10101, @10101, 10101b.
+ #
# Revision 1.5 2014/03/11 00:15:13 pauloscustodio
# Scanner reads input line-by-line instead of character-by-character.

Index: whitebox-scan.t
===================================================================
RCS file: /cvsroot/z88dk/z88dk/src/z80asm/t/whitebox-scan.t,v
retrieving revision 1.36
retrieving revision 1.37
diff -C2 -d -r1.36 -r1.37
*** whitebox-scan.t 9 Feb 2014 10:16:15 -0000 1.36
--- whitebox-scan.t 29 Mar 2014 00:33:29 -0000 1.37
***************
*** 21,463 ****
use Test::More;
use File::Slurp;
- use Capture::Tiny 'capture';
use Test::Differences;

! my $objs = "scan.o errors.o ".
! "lib/strutil.o lib/xmalloc.o lib/strhash.o lib/fileutil.o ".
! "lib/srcfile.o lib/strpool.o lib/die.o lib/except.o lib/class.o ".
"lib/list.o";
! my $compile = "cc -Wall -otest -Ilib test.c $objs";
[...980 lines suppressed...]


# $Log$
+ # Revision 1.37 2014/03/29 00:33:29 pauloscustodio
+ # BUG_0044: binary constants with more than 8 bits not accepted
+ # CH_0022: Added syntax to define binary numbers as bitmaps
+ # Replaced tokenizer with Ragel based scanner.
+ # Simplified scanning code by using ragel instead of hand-built scanner
+ # and tokenizer.
+ # Removed 'D' suffix to signal decimal number.
+ # Parse AF' correctly.
+ # Decimal numbers expressed as sequence of digits, e.g. 1234.
+ # Hexadecimal numbers either prefixed with '0x' or '$' or suffixed with 'H',
+ # in which case they need to start with a digit, or start with a zero,
+ # e.g. 0xFF, $ff, 0FFh.
+ # Binary numbers either prefixed with '0b' or '@', or suffixed with 'B',
+ # e.g. 0b10101, @10101, 10101b.
+ #
# Revision 1.36 2014/02/09 10:16:15 pauloscustodio
# Remove complexity out of scan.rl by relying on srcfile to handle contexts of


------------------------------------------------------------------------------
Post Reply