Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Shameless self-plug of my own expression language supporting multiple types: https://github.com/AlexErrant/Pentive/blob/main/shared-dom/s...

It's a Lezer grammar using the Github search syntax style. Currently undocumented, but the autocomplete/syntax highlighting (thanks to Lezer) is pretty good. It can handle search strings like this:

    created<2024-09-24 foo -bar spider-man "wildcard*" ```literal"'`quotes``` (a b "quoted string") (c OR d OR `lit'eral`) -(x y OR z) (tag:mytag,'your tag') state:normal (arbitrary (nesting (edited<2024-09-23 OR created=2024-09-17))) /regex/si due=true tagCount=0 field:"user input field name":/lol regex/ui


Nice contribution! Seems that you are using Lezer for handling the parsing. Multi-type parsers are a fascinating subject but I haven’t encountered many references to them either. It would be interesting to explore more projects or approaches in that area. Contributions are welcome!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: