Giter Site home page Giter Site logo

fred's Introduction

Fast Regular Expressions for D (FReD)
a project proposed as source level compatible replacement for std.regex 
After being accepted into Phobos FReD repository is used for various tools & benchmarks of std.regex, that can't go into D core repo for obvious reasons. 

Package contents
--------------------------
bench\*          - sample programs for benchmarking (D vs other languages/libraries)
tools\*          - various helper tools for code generation and self testing

Building
--------------------------

If you just need a test tool to give you a head start, you can compile d_r.d from bench, usage is:
fred_r pattern file [print]
Use the "" around pattern to keep away your shell interpreter that is always hungry for special characters.

Build scripts and benchmark harness are work in progress at the moment.

Notes for testers
--------------------------
While project is mature enough for mainstream usage (barring CTFE parts), there could be some bugs in the hiding.
Things to keep an eye for:
    - something that doesn't compile with FReD, but did with std.regex
    - hits on assert(0) and access violation :o)
    - innocent looking pattern takes enormous time to match, particularly
      if it's two mostly identical patterns that have drastically different performance
    - character set operations (particularly subtraction (--) and intersection (&&))
    - interesting case insensitve matching (i.e. unicode characters/texts)
    - Unicode conformance, see level 1 at http://unicode.org/reports/tr18/
    - static regexes, this is not for the faint of heart, but if you can get CTFE internal error 
      and able to reduce it then please do it :)
    - there are 3 different regex engines (counting C-T for static regexes) 
      to invoke traditional backtracking engine use bmatch instead of match

Now that it's in the Phobos proper, all bugs should be reported to http://d.puremagic.com/issues

Please don't hesitate to include bogus pattern, test _input_, OS and compiler version
Any additional tests on e.g. conformance are also welcome.

Know some really good regex library Brand X (for c/c++ preferably?) Please do tell.

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.