Giter Club home page Giter Club logo

myregex's Introduction

MyRegex

CI

MyRegex is a project I (Rocketnia) made in March 2008. I had recently learned about regular expressions, and their suite of operations for composing pattern-matching operations was inspiring to me. I didn't know the term "combinator parser library" at the time, but that's what this is.

Traditional regex systems require every lookbehind expression to have a maximum length known in advance. This library lifts that limitation. Every combinator has an interpretation that goes backwards, applying its match from the end of the string to the beginning.

Traditional regex systems have a backreference operator, to assert that a certain matched substring appears again at another location in the overall match. The mechanism I implemented here is somewhat more expressive: The parser combinators can collect multiple substring matches under a single name, and another combinator can take a look at this set and force a backtrack if not all the substrings are identical.

Installation and use

To build MyRegex, first install a distribution of the JDK. We've used Eclipse Temurin 17.0.1+12 from Adoptium, but MyRegex should work even on much older JVM versions. (At the time of development in 2008, I was developing in Java 6 on the Sun Microsystems JDK.)

Then, run a build with the Gradle wrapper.

./gradlew build

This runs unit tests and creates a JAR file in lib/build/lisbs/lib.jar.

myregex's People

Contributors

rocketnia avatar

Watchers

 avatar  avatar

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.