Participle is a parser library for Go that lets developers define parsers in an idiomatic Go style. It uses annotated Go structs to describe grammar rules and produce the parsed AST at the same time. This approach feels familiar to Go developers because it resembles the way struct tags are used for formats such as JSON. The library supports a rich grammar syntax with captures, recursive captures, grouping, alternatives, repetition, lookahead, and literal matching. It also supports custom capture behavior, union-like parser structures, and custom parsing hooks for more advanced grammars. Participle is useful when developers want readable parser definitions without switching to a separate grammar file or external parser generator.

Features

  • Defines grammars with annotated Go structs
  • Produces AST structures directly from parser definitions
  • Supports captures, recursive captures, groups, alternatives, and repetition
  • Provides positive and negative lookahead syntax
  • Supports custom capture logic and text unmarshaling
  • Includes union type support and custom parser hooks

Project Samples

Project Activity

See All Activity >

Categories

Libraries

License

MIT License

Follow Participle

Participle Web Site

Other Useful Business Software
MongoDB Atlas runs apps anywhere Icon
MongoDB Atlas runs apps anywhere

Deploy in 115+ regions with the modern database for every enterprise.

MongoDB Atlas gives you the freedom to build and run modern applications anywhere—across AWS, Azure, and Google Cloud. With global availability in over 115 regions, Atlas lets you deploy close to your users, meet compliance needs, and scale with confidence across any geography.
Start Free
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of Participle!

Additional Project Details

Programming Language

Go

Related Categories

Go Libraries

Registered

2026-06-11