nmichel / ejpet Goto Github PK
View Code? Open in Web Editor NEWMatching JSON nodes in Erlang
Matching JSON nodes in Erlang
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
Expression */**/42/g
is ambiguous.
It can be read either
*/ ... /g
or
... **/42/g
The erlang parser associates the marker to the nearest expression (**/42
, in the example).
But the javascript port of ejpet (jjpet) associates it to the outer expression (*/
, in the example).
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 ...
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.
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 separatornull
is the default value.Allowed default values:
null
true
false
Should we consider using injection for the default value ? Could be interesting ...
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.