participle

(β˜… 3,878)

A parser library for Go

  • .golangci.yml
  • .goreleaser.yml
  • api.go
  • CHANGES.md
  • context.go
  • COPYING
  • doc.go
  • ebnf.go
  • ebnf_test.go
  • error.go
  • error_test.go
  • go.mod
  • go.sum
  • grammar.go
  • grammar_test.go
  • lookahead_test.go
  • map.go
  • map_test.go
  • nodes.go
  • options.go
  • parser.go
  • parser_test.go
  • railroad.png
  • README.md
  • renovate.json5
  • struct.go
  • struct_test.go
  • TUTORIAL.md
  • validate.go
  • validate_test.go
  • visit.go

πŸš€ Installation Guide

1. Get the code
git clone https://github.com/alecthomas/participle

Downloads the entire project code from GitHub to your computer.

cd participle

Moves into the project folder you just downloaded.

2. Go

Medium Recommended
Prerequisites
  • Git Needed to download the project code from GitHub.
  • Go The Go compiler and toolchain.
cd _examples

This project's files live in a subfolder, so move into it first.

go build ./...

Compiles the Go program into an executable.

go run .

Runs the Go program directly without a separate build step.

βœ… If the build finishes without errors, it worked. If you used go run ., check the terminal output.
// repository documentation