Rework Lexer #10

Closed
opened 2026-04-30 16:20:55 +00:00 by laentropia · 0 comments
Owner

What?

Currently the lexer is very poorly written, while it now uses generic Arrays it stills is very bad and a rewrite this early will be good for the overall project health

Why?

Well, it is not sufficient, is not scalable for new operands, it takes responsability for ensuring structure, something that the parser should do. In generall it can be improved in many ways and that is the goal.

How?

I'm going to reserach about how to write a good lexer, specifically one that pairs well with pratt parsing (just need it to work fine i guess) so that it's more compatible and can be better tested.

# What? Currently the lexer is very poorly written, while it now uses generic Arrays it stills is very bad and a rewrite this early will be good for the overall project health # Why? Well, it is not sufficient, is not scalable for new operands, it takes responsability for ensuring structure, something that the parser should do. In generall it can be improved in many ways and that is the goal. # How? I'm going to reserach about how to write a good lexer, specifically one that pairs well with pratt parsing (just need it to work fine i guess) so that it's more compatible and can be better tested.
laentropia added this to the (deleted) project 2026-04-30 16:20:55 +00:00
Sign in to join this conversation.
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
laentropia/Calculator#10
No description provided.