DEV Community

Discussion on: I'm building a programming language: Creating tokens

Collapse
 
dnbln profile image
Dinu Blanovschi

You can use LALRPOP with an external (logos) lexer. Here is the chapter in the lalrpop book on external lexers and tl;dr you only need a type that implements Iterator<Item=Result<(Location, Token, Location), Error>> while the logos lexer gives you Iterator<Item=Token>.