summaryrefslogtreecommitdiff
path: root/boot/tokenizer.s
diff options
context:
space:
mode:
Diffstat (limited to 'boot/tokenizer.s')
-rw-r--r--boot/tokenizer.s20
1 files changed, 17 insertions, 3 deletions
diff --git a/boot/tokenizer.s b/boot/tokenizer.s
index e358b89..bf8e443 100644
--- a/boot/tokenizer.s
+++ b/boot/tokenizer.s
@@ -266,9 +266,9 @@ transitions:
.word 0x05ff, 0x0102, 0x05ff, 0x0102, 0x0102, 0x0102, 0x05ff, 0x05ff
.word 0x05ff, 0x05ff, 0x05ff, 0x05ff # 0x02 Identifier
- .word 0x02ff, 0x0103, 0x00ff, 0x02ff, 0x02ff, 0x02ff, 0x02ff, 0x02ff
- .word 0x02ff, 0x02ff, 0x02ff, 0x00ff, 0x0103, 0x02ff, 0x02ff, 0x02ff
- .word 0x02ff, 0x02ff, 0x02ff, 0x02ff # 0x03 Integer
+ .word 0x08ff, 0x0103, 0x00ff, 0x08ff, 0x08ff, 0x08ff, 0x08ff, 0x08ff
+ .word 0x08ff, 0x00ff, 0x08ff, 0x00ff, 0x0103, 0x00ff, 0x08ff, 0x08ff
+ .word 0x08ff, 0x08ff, 0x08ff, 0x08ff # 0x03 Integer
.word 0x02ff, 0x02ff, 0x02ff, 0x02ff, 0x02ff, 0x04ff, 0x02ff, 0x02ff
.word 0x02ff, 0x02ff, 0x02ff, 0x02ff, 0x02ff, 0x02ff, 0x02ff, 0x02ff
@@ -518,6 +518,9 @@ _tokenize_next:
li t0, 0x07 # An action for symbols containing multiple characters.
beq t1, t0, .Ltokenize_next_composite
+ li t0, 0x08 # Integer action.
+ beq t1, t0, .Ltokenize_next_integer
+
j .Ltokenize_next_reject
.Ltokenize_next_reject:
@@ -588,6 +591,17 @@ _tokenize_next:
j .Ltokenize_next_end
+.Ltokenize_next_integer:
+ lw a1, 12(sp)
+ sub a0, s1, a1
+ sw a0, 8(sp)
+ sw a0, 4(sp)
+ lw a0, 0(sp)
+ addi a1, sp, 4
+ li a2, 12
+ call _memcpy
+ j .Ltokenize_next_end
+
.Ltokenize_next_end:
mv a0, s1 # Return the advanced text pointer.