From d2cddbdac9da692b0f8c1512bf4e875ab6eb5a3c Mon Sep 17 00:00:00 2001 From: Kelvin Sherlock Date: Thu, 19 Mar 2020 23:54:22 -0400 Subject: [PATCH] when checking if an identifier is a reserved word, the scanner has a table mapping the first character to the number of reserved words starting with that character. However, it only has entries for characters A-Z. _ is a valid leading character which causes unexpected results. --- scanner.asm | 1 + 1 file changed, 1 insertion(+) diff --git a/scanner.asm b/scanner.asm index 3f85230..f9ea74e 100644 --- a/scanner.asm +++ b/scanner.asm @@ -1085,6 +1085,7 @@ sop dc i1'0,xor,0,0,0,0,band,0' nrw dc i'2,1,2,3,2,3,1,0,5,0' number of reserved words starting with dc i'0,1,1,2,4,3,0,2,2,3' each letter of the alphabet dc i'4,1,2,0,0,0' + dc i'0,0,0,0,0' [\]^_ (_ is an allowed identifier prefix) arw dc a'rwa,rwb,rwc,rwd,rwe' address of first reserved word for each dc a'rwf,rwg,rwh,rwi,rwj' letter of the alphabet dc a'rwk,rwl,rwm,rwn,rwo'