Giter Site home page Giter Site logo

ejpet's People

Contributors

nmichel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

ejpet's Issues

generators fail when expression contains regex and some options are given

Erlang re:compile/2 function doesn't appreciate options it doesn't know about ๐Ÿ˜…

option 1 - filter options to keep only those allowed by re:compile/2
option 2 - extend expression grammar to allow passing option in the regex matching expression
e.g. #"catch_me"(op1, op2, op3=value)

options2 is better because it allows different sets of options for each regex matching subpart in an matching expression

Caching should be fully optionnal

Currently functions generators always refer to the caching stub. This should be an option : there must be an expression compile-time option to bypass the caching stub ...

[true, "foo", true] should match [*, true]

Both following calls should yield {true, []}

ejpet:match("[false, 42, true]", "[*, true]") => {true, []}
ejpet:match("[true, 42, true]", "[*, true]") => {false, []}

There is something wrong when the last matching expression ("true") is matched by an element before the last one.

Add the ability to capture "default" value

When a sub-expression does not match, but is nested in a capture expression, add the ability to define a default captured value.

This allows for "regularized" captures sets (with the same length, essentially), hence easing batch processing of captures sets.

syntax suggestion: (?<my_cap>_ | null) where

  • |is the separator
  • null is the default value.

Allowed default values:

  • null
  • true
  • false
  • a number
  • a string

Should we consider using injection for the default value ? Could be interesting ...

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.