Skip to content

h4-h/malex

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Malex

Malex is a lexer based on macroses.

Usage

use malex::*;

token_rules!{
  TokenKind("string representation") => |input: &str| -> Option<usize> { returns token size },
}

fn main() {
  let lexer = Lexer::new(input).tokenize();
}

Thats all, see example for more information.

Why this instead of X?

I don't know, it's simple and that's all, simplicity in code makes it slow, because for searching Token it goes through vector of rules and than returns a vector of matched rules.

About

Simple and slow lexer in rust

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages