Skip to content
Fast lexer code generator for Rust
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
docs First commit Apr 8, 2019
examples
src Move process function to lib.rs Apr 10, 2019
.gitignore
Cargo.toml
LICENSE First commit Apr 8, 2019
README.md

README.md

rflex

rflex is a fast lexical analyzer generator for Rust.

GitHub license Crates Status

cargo install rflex

or

Write your Cargo.toml and build.rs

[package]
# ...
build = "build.rs"

[build-dependencies]
# ...
rflex = "0.2"
extern crate rflex;
use std::path::Path;

fn main() {
    let path = Path::new("src").join("target.l");
    let path = path.to_str().unwrap().to_string();
    if let Err(e) = rflex::process(path) {
        eprintln!("{}", e);
        std::process::exit(1);
    }
}

See tutorial.md.

Unsupported regular-expression

  • e{num} ... repeat e num times
  • e{min,max} ... repeat e min to max times
  • e/s ... lookahead s before accept e

License

  • rflex is released under MIT License.

Copyright

  • Copyright (c) 2018 Preferred Networks, Inc.
  • Partial original codes were written in Java under 3-clause BSD license:
    • Copyright (c) Gerwin Klein, Steve Rowe, Regis Decamp. All rights reserved.

Dependent libraries

These libraries are used only rflex lexer generator, generated code doesn't depend on them.

  • fixedbitset released under MIT License
    • Copyright (c) 2015-2017
  • liquid released under MIT License
    • Copyright (c) 2014 cobalt-org
You can’t perform that action at this time.