Git Product home page Git Product logo

sml-regex-builder's Introduction

This project allows for translation between grep style regex strings and the regular expression data type utilized by 15-150.

Syntax

Any single character, e.g., a will match that character. To match a literal version of a meta-character escape it with backslash, e.g., \* will match the character *. Adjacent characters are treated as the concatenation of those characters.

Characters can be grouped for other commands with parentheses ((, )).

Any atom (either a single character or characters grouped by parentheses) followed by a * will be matched 0 or more times.

Two atoms can be alternatively matched with |. For instance a|b would match either a or b.

Examples

  • a will match the single character a
  • a|b will match either the single character a or the single character b
  • a* will match a 0 or more times
  • abc will match the string abc
  • (ab)*c will match ab 0 or more times followed by c
  • a|b* will match either:
    • a; or,
    • b 0 or more times

License

MIT

Authors

Code for parsing regular expression in string format into the internal datatype was written by Cooper Pierce and James Gallicchio.

Code which utilizes Regex.t values to match and accept regex was written by 15-150 course staff, including Michael Erdmann and Frank Pfenning

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.