Git Product home page Git Product logo

regex's Introduction

regex

最近学习编译原理,基于NFA实现了正则表达式,代码刚写完,具体内容参考博客https://blog.csdn.net/xindoo/article/details/105875239,欢迎查阅。
已实现NFA转DFA,详见博客从0到1打造正则表达式执行引擎(二).

目前还是demo,算是刚把引擎的骨架搭建起来,后续继续完善代码。

是什么不是什么?

这个引擎不会是一个可以用在生产环境的项目,但会是一个了解正则引擎背后工作原理的项目。

现状

目前支持的语义
基本语义: . ? * + () |
字符集合: [] 非打印字符: \d \D \s \S \w \W
支持DFA和NFA双引擎

Todo

  • 支持{}限定符
  • 支持 ^ $ \b 等定位符
  • 实现DFA引擎
  • DFA最小化(Hopcroft算法)
  • 支持捕获和引用

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.