File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- ply == 3.10
1+ ply == 3.11
22six
33
Original file line number Diff line number Diff line change 1+ org 32768
2+ __START_PROGRAM:
3+ di
4+ push ix
5+ push iy
6+ exx
7+ push hl
8+ exx
9+ ld hl , 0
10+ add hl , sp
11+ ld (__CALL_BACK__) , hl
12+ ei
13+ #line 1
14+ `mylabel:
15+ ld a , # 0
16+ #line 3
17+ ld hl , 0
18+ ld b , h
19+ ld c , l
20+ __END_PROGRAM:
21+ di
22+ ld hl , (__CALL_BACK__)
23+ ld sp , hl
24+ exx
25+ pop hl
26+ exx
27+ pop iy
28+ pop ix
29+ ei
30+ ret
31+ __CALL_BACK__:
32+ DEFW 0
33+ ZXBASIC_USER_DATA:
34+ ; Defines DATA END --> HEAP size is 0
35+ ZXBASIC_USER_DATA_END:
36+ ; Defines USER DATA Length in bytes
37+ ZXBASIC_USER_DATA_LEN EQU ZXBASIC_USER_DATA_END - ZXBASIC_USER_DATA
38+ END
Original file line number Diff line number Diff line change 1+
2+ ASM
3+ `mylabel:
4+ ld a, #0
5+ END ASM
6+
Original file line number Diff line number Diff line change 1+
2+ REM This should fail because it's used in BASIC context
3+
4+ LET `a = 1
5+
6+
Original file line number Diff line number Diff line change @@ -109,6 +109,7 @@ fornextopt2.bas:4: warning: FOR start value is lower than end. This FOR loop is
109109atoloduplbl.asm:3: label '.SetSubScreen' already defined at line 2
110110>>> process_file('asmerror2.asm')
111111asmerror2.asm:2: Error: illegal preprocessor character '@'
112+ asmerror2.asm:2: illegal character '#'
112113asmerror2.asm:2: Syntax error. Unexpected end of line [NEWLINE]
113114>>> process_file('llb.bas')
114115llb.bas:3: Undeclared function "f$"
Original file line number Diff line number Diff line change @@ -105,7 +105,7 @@ def t_INITIAL_CHAR(self, t):
105105 return t
106106
107107 def t_INITIAL_TOKEN (self , t ):
108- r"[][%',.:$()*/<>~&|+^-]"
108+ r"[][%'` ,.:$()*/<>~&|+^-]"
109109 return t
110110
111111 def t_prepro_define_defargs_defargsopt_defexpr_pragma_NEWLINE (self , t ):
@@ -250,6 +250,9 @@ def t_INIIAL_sharp(self, t):
250250 r'\#' # Only matches if at beginning of line and "#"
251251 if t .value == '#' and self .find_column (t ) == 1 :
252252 t .lexer .push_state ('prepro' ) # Start preprocessor
253+ else :
254+ t .type = 'TOKEN'
255+ return t
253256
254257 def t_defexpr_TOKEN (self , t ):
255258 r'=>|<=|>=|<>|[@:.<>^=+*/&|%-]'
Original file line number Diff line number Diff line change @@ -122,7 +122,7 @@ def t_asm_CHAR(self, t):
122122 return t
123123
124124 def t_asm_TOKEN (self , t ):
125- r"[]['.:$*/+<>|&~%^-]"
125+ r"[]['` .:$*/+<>|&~%^-]"
126126 return t
127127
128128 def t_INITIAL_CONTINUE (self , t ):
@@ -331,6 +331,9 @@ def t_INITIAL_asm_sharp(self, t):
331331 if self .find_column (t ) == 1 :
332332 t .lexer .push_state ('prepro' ) # Start preprocessor
333333 self .expectingDirective = True
334+ else :
335+ t .type = 'TOKEN'
336+ return t
334337
335338 def t_INITIAL_defexpr_TOKEN (self , t ):
336339 r'=>|<=|>=|<>|[$!&|~@:;{}.<>^=+*/%-]'
You can’t perform that action at this time.
0 commit comments