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
Our Free Plans just got better! | Auth0 Icon
Our Free Plans just got better! | Auth0

With up to 25k MAUs and unlimited Okta connections, our Free Plan lets you focus on what you do best—building great apps.

You asked, we delivered! Auth0 is excited to expand our Free and Paid plans to include more options so you can focus on building, deploying, and scaling applications without having to worry about your security. Auth0 now, thank yourself later.
Try free now
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

22 hours ago