logos icon indicating copy to clipboard operation
logos copied to clipboard

Create ridiculously fast Lexers

Results 130 logos issues
Sort by recently updated
recently updated
newest added

Currently, logos does not allow nesting `Skip` and `Filter` in `Option` or `Result`. This makes the following pattern very difficult (impossible?) to express: * Match a "start" pattern. * Compute...

I see the documentation covers perfectly how to use `priority`, which is why I'm confused how I could still be getting this wrong. I have a number regex (build from...

Example: ```rust use logos::Logos; #[derive(Logos, Debug, PartialEq)] enum Token { #[error] Error, #[regex(r"[\u{0}-\u{10FFFF}]")] AnyChar, } fn main() { let mut lex = Token::lexer("Ω"); assert_eq!(lex.next(), Some(Token::AnyChar)); assert_eq!(lex.span(), 0..2); // length of...

I'm trying to lex the Python language, which has the keyword `not` and the separate keyword `not in` (which may have arbitrary spaces between the `not` and `in`). My attempt...

bug

Do you think this is appropriate or would it be better to just manually re-create some of the useful methods/impls such as `Clone` `source()` `slice()`?

Started using logos and getting the following error for the following simple scenario based on docs. Let me know what i'm missing. Using rust 1.56.1, 2021 edition. `use logos::{Lexer, Logos};...

When I ran `cargo test` I got a whole bunch of warnings for unescaped newlines in multiline error message strings. This PR fixes those warnings by properly escaping newlines.

This lexical grammar is ambiguous with only one character lookahead and no backtracking: ```rust #[derive(Logos, Debug)] enum Token { #[error] Error, #[token("a")] A, #[token("axb")] B, #[regex("ax[bc]")] Word, } ``` It...

bug

Hello, First, I really like your project, and I'd like to thank you for that! Second, I am quite new to this project, so I hope this question is not...

.cargo/registry/src/github.com-1ecc6299db9ec823/logos-derive-0.7.7/src/lib.rs:55:20 | 55 | extras.insert(util::ident(&ext), |_| panic!("Only one #[extras] attribute can be declared.")); | ^^^^^^ ----------------- ----------------------------------------------------------- supplied 2 arguments | | | expected 1 argument | note: associated function...