Skip to content

Lexer for 6502 inline assembly #229

@Miezekatze64

Description

@Miezekatze64

[Referencing this TODO]

Using the existing B lexer would make the tokenization of 6502 inline assembly a lot easier and shorter, but we can't directly use the existing lexer as B tokens do not match 6502-asm token.

I basically see 2 options here:

  1. We add the ability to set custom tokens in the lexer similar to historical mode (this would still require us to tokenize integers as 2 tokens: $1234 as $ and 1234)
  2. Only use the lexer functions one lever deeper (skip_whitespace, etc) and build our own parse_token function.

How should we do it?
(This could also be useful for other inline assemblies like uxn.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions