logos-0.9.6 has been yanked.
Visit the last successful build:
logos-0.16.0
Create ridiculously fast Lexers.
Logos works by:
- Resolving all logical branching of token definitions into a tree.
- Optimizing complex patterns into Lookup Tables.
- Always using a Lookup Table for the first byte of a token.
- Producing code that never backtracks, thus running at linear time or close to it.
In practice it means that for most grammars the lexing performance is virtually unaffected by the number of tokens defined in the grammar. Or, in other words, it is really fast.
Example
extern crate logos;
use Logos;