All Projects → pfnet → Rflex

pfnet / Rflex

Licence: mit
Fast lexer code generator for Rust

Programming Languages

rust
11053 projects

Labels

Projects that are alternatives of or similar to Rflex

Exprtk
C++ Mathematical Expression Parsing And Evaluation Library
Stars: ✭ 301 (+201%)
Mutual labels:  lexer
Minigo
minigo🐥is a small Go compiler made from scratch. It can compile itself.
Stars: ✭ 456 (+356%)
Mutual labels:  lexer
Csstree
A tool set for CSS including fast detailed parser, walker, generator and lexer based on W3C specs and browser implementations
Stars: ✭ 1,121 (+1021%)
Mutual labels:  lexer
Lexmachine
Lex machinary for go.
Stars: ✭ 335 (+235%)
Mutual labels:  lexer
Tiny Compiler
A tiny compiler for a language featuring LL(2) with Lexer, Parser, ASM-like codegen and VM. Complex enough to give you a flavour of how the "real" thing works whilst not being a mere toy example
Stars: ✭ 425 (+325%)
Mutual labels:  lexer
Mico
Mico ("Monkey" in catalan). Monkey language implementation done with C++. https://interpreterbook.com/
Stars: ✭ 19 (-81%)
Mutual labels:  lexer
Edge
Node.js templating engine with fresh air
Stars: ✭ 270 (+170%)
Mutual labels:  lexer
Rs Monkey Lang
Monkey Programming Language written in Rust.
Stars: ✭ 80 (-20%)
Mutual labels:  lexer
Moo
Optimised tokenizer/lexer generator! 🐄 Uses /y for performance. Moo.
Stars: ✭ 434 (+334%)
Mutual labels:  lexer
Logos
Create ridiculously fast Lexers
Stars: ✭ 1,001 (+901%)
Mutual labels:  lexer
Jflex
The fast scanner generator for Java™ with full Unicode support
Stars: ✭ 380 (+280%)
Mutual labels:  lexer
Php Parser
🌿 NodeJS PHP Parser - extract AST or tokens (PHP5 and PHP7)
Stars: ✭ 400 (+300%)
Mutual labels:  lexer
Snl Compiler
SNL(Small Nested Language) Compiler. Maven jUnit Tokenizer Lexer Syntax Parser. 编译原理 词法分析 语法分析
Stars: ✭ 19 (-81%)
Mutual labels:  lexer
Syntax Parser
Light and fast 🚀parser! With zero dependents. - Sql Parser Demo added!
Stars: ✭ 317 (+217%)
Mutual labels:  lexer
Wordtokenizers.jl
High performance tokenizers for natural language processing and other related tasks
Stars: ✭ 63 (-37%)
Mutual labels:  lexer
Re Flex
The regex-centric, fast lexical analyzer generator for C++ with full Unicode support. Faster than Flex. Accepts Flex specifications. Generates reusable source code that is easy to understand. Introduces indent/dedent anchors, lazy quantifiers, functions for lex/syntax error reporting, and more. Seamlessly integrates with Bison and other parsers.
Stars: ✭ 274 (+174%)
Mutual labels:  lexer
Libfsm
DFA regular expression library & friends
Stars: ✭ 512 (+412%)
Mutual labels:  lexer
Graphql Go Tools
Tools to write high performance GraphQL applications using Go/Golang.
Stars: ✭ 96 (-4%)
Mutual labels:  lexer
Charly Vm
Fibers, Closures, C-Module System | NaN-boxing, bytecode-VM written in C++
Stars: ✭ 66 (-34%)
Mutual labels:  lexer
Tox
misc parsers in rust
Stars: ✭ 40 (-60%)
Mutual labels:  lexer

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]
# ...
failure = "0.1.5"
rflex = "0.8"
extern crate rflex;
use std::env;
use std::path::Path;

fn main() {
    let out_dir = env::var("OUT_DIR").unwrap();
    let dest = Path::new(&out_dir).join("target.rs");
    let path = Path::new("src").join("target.l");
    if let Err(e) = rflex::process(path, Some(dest)) {
        for cause in failure::Fail::iter_chain(&e) {
            eprintln!("{}: {}", cause.name().unwrap_or("Error"), cause);
        }
        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
  • failure released under MIT License
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].