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
Build Agents and Models on One Platform Icon
Build Agents and Models on One Platform

Everything you need to build production-ready agents and models. Access 200+ Google and third-party AI models and tools.

Gemini Enterprise Agent Platform is Google Cloud's comprehensive platform for developers to build, scale, govern, and optimize agents and models. Choose from Google's most advanced models and third-party models like Anthropic's Claude Model Family.
Try It 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