rx
kbnf
rx | kbnf | |
---|---|---|
1 | 6 | |
3 | 0 | |
- | - | |
3.1 | 0.0 | |
6 months ago | about 1 year ago | |
Rust | ||
- | GNU General Public License v3.0 or later |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
rx
-
A portable, modern regular expression language
I had a similar kind of idea for a long time, which I put into action a few weeks ago via a standalone transpiler of Emacs' rx macro to common regexp syntaxes.[0] I ended up getting interrupted and didn't completely finish it, but it generally works, though is probably riddled with edge cases.
The basic idea of rx is to use S-expressions to describe regular expressions, and my elevator pitch would've been to embed rx invocations in shell scripts using $(syntax), the main use case being something like sed invocations.
I still think it's a neat idea, and complex regular expressions tend to be hard to parse for humans.
[0]: https://github.com/sulami/rx
kbnf
- Ask HN: Please Review My Metalanguage
- Please Review My Metalanguage
-
A portable, modern regular expression language
The fundamental problem comes from assigning meaning to whitespace (in this case, concatenation). I had the same issues when developing KBNF ( https://github.com/kstenerud/kbnf/blob/master/kbnf.md ) which operates in a closely related space.
In early development, I took a number of cues from regex that turned out to be bad ideas, in particular using whitespace for concatenation (which all BNF dialects seem to do).
Switching to '&' for concatenation fixed it and made things a lot clearer, as it would also do for Pomsky:
'Hello' & ' '+ & ('world' | 'pomsky')
-
Ask HN: Please help me by reviewing KBNF
Hi everyone! Merry Christmas and happy new year!
I'm making a modernized BNF-style metalanguage that supports grammars for text and binary formats, but unless there's some kind of outside review, I won't find any blind spots I have until long after release.
If you have experience in grammars or protocols (text or binary), could you take a quick look?
Note: I'm not aiming for perfect expressivity; just 80-90% of use cases without making things overcomplicated so that it can be used descriptively in documentation.
https://github.com/kstenerud/kbnf/blob/master/kbnf.md
-
Social media may prevent users from reaping creative rewards of profound boredom
Boredom is what led to pretty much every project I've ever done. I usually have a list in my head of things that could be made better, but they never come to anything until I have a lengthy period of nothing to do.
Latest example: I had to take all my vacation time this year or else I'd lose it. I got so bored that I built this over the past weeks: https://github.com/kstenerud/kbnf
What are some alternatives?
logstash-patterns - Grok patterns for parsing and structuring log messages with logstash
ReadingQuarkXpress - Some code to read certain Quark Xpress files
fluent-plugin-grok-parser - Fluentd's Grok parser
common-regex - Most common regex
ReadableRegex.jl - regexes for people who don't really want to learn or read regexes
oil - Oils is our upgrade path from bash to a better language and runtime. It's also for Python and JavaScript users who avoid shell!
hfst - Helsinki Finite-State Technology (library and application suite)