# file opened: cpp_literals.asm
 1    0000                  ; new syntax did break legacy sources in specific case like "0b800h"
 2    0000 00 B1 00 B1      dw      0b100h, 0xb100
 3    0004
 4    0004                  ; new syntax to define: 0b..|0B.. = binary number (C++ rule), 0q..|0Q.. = octal number
 5    0004 5D 5D 5D 5D      db      %01011101, 01011101b, 01011101B, 0b01011101, 0B01011101
 5    0008 5D
 6    0009 49 49 49 49      db      111q, 111Q, 111o, 111O, 0q111, 0Q111
 6    000D 49 49
 7    000F                  ; other old syntax, just verifying syntax highlight of editor and functionality
 8    000F 41 41 41         db      65, 65d, 65D
 9    0012 42 42 42 42      db      $42, #42, 0x42, 0X42, 42h, 42H
 9    0016 42 42
10    0018              111:
11    0018 18 FE            jr      111B        ; temporary labels will steal "binary" highlight up to 3 chars
12    001A              1001:
13    001A 18 FE            jr      1001B       ; four+ chars: the binary value highlight wins even for label
14    001C
15    001C                  ; digit-group ticks tests - fully valid ones
16    001C 5D 5D 5D 5D      db      %01'01'11'01, 01'01'11'01b, 01'01'11'01B, 0b01'01'11'01, 0B01'01'11'01
16    0020 5D
17    0021 49 49 49 49      db      1'1'1q, 1'1'1Q, 1'1'1o, 1'1'1O, 0q1'1'1, 0Q1'1'1
17    0025 49 49
18    0027 41 42 41 42      dw      1'6'961, 1'6'961d, 1'6'961D
18    002B 41 42
19    002D 43 44 43 44      dw      $4'4'43, #4'4'43, 0x4'4'43, 0X4'4'43, 4'4'43h, 4'4'43H
19    0031 43 44 43 44
19    0035 43 44 43 44
20    0039
21    0039                  ; digit-group ticks tests - invalid beginning
cpp_literals.asm(22): error: Missing next digit: %'01'01'11'01
22    0039                  db      %'01'01'11'01
cpp_literals.asm(23): error: Unexpected: 01'11'01B,
23    0039 30 31            db      '01'01'11'01B,
cpp_literals.asm(24): error: Missing next digit: 0B'01'01'11'01
24    003B                  db      0B'01'01'11'01
cpp_literals.asm(25): error: Unexpected: 1'1Q
25    003B 31               db      '1'1'1Q
cpp_literals.asm(26): error: Unexpected: 1'1O
26    003C 31               db      '1'1'1O
cpp_literals.asm(27): error: Missing next digit: 0Q'1'1'1
27    003D                  db      0Q'1'1'1
cpp_literals.asm(28): error: Unexpected: 6'961
28    003D 31 00            dw      '1'6'961
cpp_literals.asm(29): error: Unexpected: 6'961D
29    003F 31 00            dw      '1'6'961D
cpp_literals.asm(30): error: Unexpected: '4'4'43
30    0041 41 00            dw      $'4'4'43
cpp_literals.asm(31): error: [DW/DEFW/WORD] Syntax error: #'4'4'43
31    0043                  dw      #'4'4'43
cpp_literals.asm(32): error: Missing next digit: 0X'4'4'43
32    0043                  dw      0X'4'4'43
cpp_literals.asm(33): error: Unexpected: 4'43H
33    0043 34 00            dw      '4'4'43H
34    0045
35    0045                  ; digit-group ticks tests - invalid end
cpp_literals.asm(36): error: Unexpected: '
36    0045 5D               db      %01'01'11'01'
cpp_literals.asm(37): error: Missing next digit: 01'01'11'01'B
37    0046                  db      01'01'11'01'B
cpp_literals.asm(38): error: Unexpected: '
38    0046 5D               db      0B01'01'11'01'
cpp_literals.asm(39): error: Missing next digit: 1'1'1'Q
39    0047                  db      1'1'1'Q
cpp_literals.asm(40): error: Missing next digit: 1'1'1'O
40    0047                  db      1'1'1'O
cpp_literals.asm(41): error: Unexpected: '
41    0047 49               db      0Q1'1'1'
cpp_literals.asm(42): error: Unexpected: '
42    0048 41 42            dw      1'6'961'
cpp_literals.asm(43): error: Missing next digit: 1'6'961'D
43    004A                  dw      1'6'961'D
cpp_literals.asm(44): error: Unexpected: '
44    004A 43 44            dw      $4'4'43'
cpp_literals.asm(45): error: Unexpected: '
45    004C 43 44            dw      #4'4'43'
cpp_literals.asm(46): error: Unexpected: '
46    004E 43 44            dw      0X4'4'43'
cpp_literals.asm(47): error: Missing next digit: 4'4'43'H
47    0050                  dw      4'4'43'H
48    0050
49    0050                  ; digit-group ticks tests - two ticks are invalid too
cpp_literals.asm(50): error: Unexpected: ''1101
50    0050 05               db      %0101''1101
cpp_literals.asm(51): error: Unexpected: ''1101B
51    0051 65               db      0101''1101B
cpp_literals.asm(52): error: Unexpected: ''1101
52    0052 05               db      0B0101''1101
cpp_literals.asm(53): error: Unexpected: ''1Q
53    0053 0B               db      11''1Q
cpp_literals.asm(54): error: Unexpected: ''1O
54    0054 0B               db      11''1O
cpp_literals.asm(55): error: Unexpected: ''1
55    0055 09               db      0Q11''1
cpp_literals.asm(56): error: Unexpected: ''961
56    0056 10 00            dw      16''961
cpp_literals.asm(57): error: Unexpected: ''961D
57    0058 10 00            dw      16''961D
cpp_literals.asm(58): error: Unexpected: ''43
58    005A 44 00            dw      $44''43
cpp_literals.asm(59): error: Unexpected: ''43
59    005C 44 00            dw      #44''43
cpp_literals.asm(60): error: Unexpected: ''43
60    005E 44 00            dw      0X44''43
cpp_literals.asm(61): error: Unexpected: ''43H
61    0060 2C 00            dw      44''43H
62    0062
63    0062                  ; digit-group underscore tests - fully valid ones ; v1.21.1: underscore added (it's nice to be C++ compatible, but _ keeps being mentioned)
64    0062 5D 5D 5D 5D      db      %01_01_11_01, 01_01_11_01b, 01_01_11_01B, 0b01_01_11_01, 0B01_01_11_01
64    0066 5D
65    0067 49 49 49 49      db      1_1_1q, 1_1_1Q, 1_1_1o, 1_1_1O, 0q1_1_1, 0Q1_1_1
65    006B 49 49
66    006D 41 42 41 42      dw      1_6_961, 1_6_961d, 1_6_961D
66    0071 41 42
67    0073 43 44 43 44      dw      $4_4_43, #4_4_43, 0x4_4_43, 0X4_4_43, 4_4_43h, 4_4_43H
67    0077 43 44 43 44
67    007B 43 44 43 44
68    007F
69    007F                  ; digit-group underscore tests - invalid beginning (fewer than with tick, because underscore as first char is valid symbol name)
cpp_literals.asm(70): error: Missing next digit: %_01_01_11_01
70    007F                  db      %_01_01_11_01
cpp_literals.asm(71): error: Missing next digit: 0B_01_01_11_01
71    007F                  db      0B_01_01_11_01
cpp_literals.asm(72): error: Missing next digit: 0Q_1_1_1
72    007F                  db      0Q_1_1_1
cpp_literals.asm(73): error: Unexpected: _4_4_43
73    007F 7F 00            dw      $_4_4_43
cpp_literals.asm(74): error: [DW/DEFW/WORD] Syntax error: #_4_4_43
74    0081                  dw      #_4_4_43
cpp_literals.asm(75): error: Missing next digit: 0X_4_4_43
75    0081                  dw      0X_4_4_43
76    0081
77    0081                  ; digit-group underscore tests - invalid end
cpp_literals.asm(78): error: Unexpected: _
78    0081 5D               db      %01_01_11_01_
cpp_literals.asm(79): error: Missing next digit: 01_01_11_01_B
79    0082                  db      01_01_11_01_B
cpp_literals.asm(80): error: Unexpected: _
80    0082 5D               db      0B01_01_11_01_
cpp_literals.asm(81): error: Missing next digit: 1_1_1_Q
81    0083                  db      1_1_1_Q
cpp_literals.asm(82): error: Missing next digit: 1_1_1_O
82    0083                  db      1_1_1_O
cpp_literals.asm(83): error: Unexpected: _
83    0083 49               db      0Q1_1_1_
cpp_literals.asm(84): error: Unexpected: _
84    0084 41 42            dw      1_6_961_
cpp_literals.asm(85): error: Missing next digit: 1_6_961_D
85    0086                  dw      1_6_961_D
cpp_literals.asm(86): error: Unexpected: _
86    0086 43 44            dw      $4_4_43_
cpp_literals.asm(87): error: Unexpected: _
87    0088 43 44            dw      #4_4_43_
cpp_literals.asm(88): error: Unexpected: _
88    008A 43 44            dw      0X4_4_43_
cpp_literals.asm(89): error: Missing next digit: 4_4_43_H
89    008C                  dw      4_4_43_H
90    008C
91    008C                  ; digit-group underscore tests - two underscores are invalid too
cpp_literals.asm(92): error: Unexpected: __1101
92    008C 05               db      %0101__1101
cpp_literals.asm(93): error: Unexpected: __1101B
93    008D 65               db      0101__1101B
cpp_literals.asm(94): error: Unexpected: __1Q
94    008E 0B               db      11__1Q
cpp_literals.asm(95): error: Unexpected: __1
95    008F 09               db      0Q11__1
cpp_literals.asm(96): error: Unexpected: __961D
96    0090 10 00            dw      16__961D
cpp_literals.asm(97): error: Unexpected: __43
97    0092 44 00            dw      $44__43
cpp_literals.asm(98): error: Unexpected: __43H
98    0094 2C 00            dw      44__43H
99    0096
# file closed: cpp_literals.asm

Value    Label
------ - -----------------------------------------------------------
