• fubo@lemmy.world
    link
    fedilink
    English
    arrow-up
    17
    ·
    1 year ago

    Sure, but can it go the other way — turn a regexp string into a parse tree and then into Melody syntax?

    Or, at least, the equivalent of CL-PPCRE’s parse-string?

        • yoavlavi@programming.devOP
          link
          fedilink
          English
          arrow-up
          9
          ·
          1 year ago

          Awesome idea, will definitely take it into consideration when that feature is available. Melody actually has a VSCode extension with highlighting and snippets, could be added to that

        • Grandwolf319@sh.itjust.works
          link
          fedilink
          English
          arrow-up
          2
          ·
          1 year ago

          Yeah, I think it makes little sense to have another programming language to create a regex but it sounds like a great regex inspect tool.

          Keep everything in regex, want to change something complicated? You can translate it into this language, tweak it, then translate it back!

          • Die4Ever@programming.dev
            link
            fedilink
            English
            arrow-up
            1
            ·
            edit-2
            1 year ago

            maybe it makes sense if you’re working on a project that uses a ton of different regexes and really depends on them, idk what kind of project that would be though

            maybe an html parser or web browser? /s

            seriously though this would be cool in a compiled language if it’s built in, but adding another build step to transpile your regexes might be a bit annoying especially if you’re using an interpreted language