nowfound

Dev tools · September 14, 2016

Using Parsing Expression Grammars to rewrite source code

An example of PEG usage. Contribute to sebcat/move-literals development by creating an account on GitHub.

Using Parsing Expression Grammars to rewrite source code launched on September 14, 2016 with 63 votes, #987 of 3,744 launches that month and more than 90% of that year's launches. The site was still online in September 2026, 10 years on.

In plain words

Using Parsing Expression Grammars to rewrite source code is a developer tool that uses PEG parsing to automatically transform and refactor code. It is designed for programmers who need to modify codebases systematically across multiple files. The tool stands out by enabling pattern-based rewrites through grammar definitions rather than manual code changes, making large-scale refactoring more efficient and consistent.

written from the facts on this page · September 2026

Does a similar job

all alternatives →
  • A Rust macro that parses Java-like syntax and runs it as a Rust program2018 · gitlab.com · ▲195

    A Rust macro that parses Java-like syntax and runs it as a Rust program

  • Python Source Code Refactoring Toolkit via AST2021 · github.com · ▲110

    AST-based fragmental source code refactoring toolkit for Python - isidentical/refactor

  • A syntax highlighter for Git and diff output, written in Rust2020 · github.com · ▲261

    A syntax-highlighting pager for git, diff, grep, rg --json, and blame output - dandavison/delta

  • How to write a recursive descent parser2017 · craftinginterpreters.com · ▲347
  • GritQL, a Rust CLI for rewriting source code2024 · github.com · ▲280

    Hi everyone! I’m excited to open source GritQL, a Rust CLI for searching and transforming source code. GritQL comes from my experiences with conducting large scale refactors and migrations. Usually, I would start exploring a codebase with grep. This is easy to start with, but most migrations end up accumulating additional requirements like ensuring the right packages are imported and excluding cases which don’t have a viable migration path. Eventually, to build a complex migration, I usually ended up having to write a full codemod program with a tool like jscodeshift. This comes with its own…

  • Transductive regular expressions for text editing2025 · github.com · ▲263

    An extension of regular expressions for text editing, with a grep-like command-line tool. If you, like me, struggle with group logic in regular expressions, you might find it useful. I wanted to do this for a very long time. It is more of a sketch or prototype. I'd really appreciate your feedback!

More dev tools this month

the category →
  • /dev/null▲468

    a social network for devs

    Dev tools · 2d ago · dev-null.sh

  • open-source IDE for thoughtful software design. Contribute to devdotfast/whiteboard development by creating an account on GitHub.

    Dev tools · 27d ago · github.com

  • Contribute to reladraw/reladraw development by creating an account on GitHub.

    Dev tools · 25d ago · github.com

  • OpenBot▲362

    Grok Bot alternative: free, local, open-source, multiplayer

    Dev tools · 22d ago · openbot.run

  • Talanoa▲340

    Hi HN, I’m a fullstack developer, and honestly, I’ve lost count of how many side projects I’ve worked on over the years. But one idea kept coming back to me: a different kind of email client. It first came to me in 2014: “What if we could handle emails more like conversations?” Every year, I’d revisit this concept in my “Build Notes.” Ten years later, no one had built exactly what I had in mind — so I finally decided to do it myself. That’s how Talanoa was born. I wanted something focused on people, not timelines. I was tired of marking messages as unread just to remember to reply later, or…

    Dev tools · 20d ago · talanoa.email

  • CoreSpeed▲332

    One MCP for everything your agents need: apps, memory, tools

    Dev tools · 27d ago · corespeed.io

Source: Show HN post ↗

Launched alongside, September 2016

the whole month →
  • Real decks from real startups that raised over $400M

    Growth · 2016 · cirrusinsight.com

  • Bitmap & tilemap generation from a single example with the help of ideas from quantum mechanics - mxgmn/WaveFunctionCollapse

    Life & fun · 2016 · github.com

  • Smart messaging app that helps you say more and do more.

    Work · 2016 · android.com

  • Reproducing images with geometric primitives. Contribute to fogleman/primitive development by creating an account on GitHub.

    Dev tools · 2016 · github.com

  • Embedded camera sunglasses by Snapchat

    Work · 2016 · spectacles.com

  • AccessURL▲818

    Share access to accounts without sending a username/password

    Life & fun · 2016 · accessurl.com