Creating a custom lexer for LALRPOP

⚓ Rust    📅 2025-10-12    👤 surdeus    👁️ 2      

surdeus

My code: GitHub - madebyjeffrey/ParseTest: Parse Test is an experimental project to do a little more rust code and create an assembler eventually LALRPOP library.

I am starting to design an assembler for a fantasy/virtual cpu I am in the process of creating.

After discovering that LALRPOP doesn't support customization of the lexer and I need line endings for the assembler I had to figure out how to make a custom lexer. The documentation was pretty nice and had some help from one of the community discord servers on some issues as I am coming back to rust after some time.

The specific review I would like is: is there any better way to do the lexer? But anything else is fair game, I do not expect any of it to be great code but all of it has tests (some weirdness in cp437_input is to help with testing).

1 post - 1 participant

Read full topic

🏷️ Rust_feed