diff options
| author | Eugen Wissner <belka@caraus.de> | 2025-05-05 23:11:52 +0200 |
|---|---|---|
| committer | Eugen Wissner <belka@caraus.de> | 2025-05-05 23:11:52 +0200 |
| commit | 3bd86e6e1cf9634af0f45ed526181351328b350d (patch) | |
| tree | d424354a1f7cc222c880bb0d41c467f0965efdbe /boot/tokenizer.s | |
| parent | df1c0486c5c7e88e9a5a3bd8a4335fc74c4963fc (diff) | |
| download | elna-3bd86e6e1cf9634af0f45ed526181351328b350d.tar.gz | |
Add my homegrown cross compiler scripts
Diffstat (limited to 'boot/tokenizer.s')
| -rw-r--r-- | boot/tokenizer.s | 20 |
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. |
