zydeco-lang / zydeco

a proof-of-concept programming language based on Call-by-push-value
Other
49 stars 3 forks source link

Custom Lexer #15

Closed maxsnew closed 1 year ago

maxsnew commented 1 year ago

From trying out the current parser, I think some of the error messages would be seriously improved by a better lexer. This would also allow us to integrate (line) comment syntax (#14) easily.

As for how to do it, https://lib.rs/crates/logos looks like a fairly straightforward library, and http://lalrpop.github.io/lalrpop/lexer_tutorial/002_writing_custom_lexer.html is a tutorial on how to integrate the lexer with LALRPOP

LighghtEeloo commented 1 year ago

Addressed in b53cef767245b396b8359949d0c625bfe4932014.

maxsnew commented 1 year ago

Great! Thanks