Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
P

parslet

> 编程语言
Open source

A small PEG based parser library. See the Hacking page in the Wiki as well.

841 stars0 likes2 views
WebsiteGitHub

About

A small PEG based parser library. See the Hacking page in the Wiki as well.

INTRODUCTION

Parslet makes developing complex parsers easy. It does so by

  • providing the best error reporting possible
  • not generating reams of code for you to debug

Parslet takes the long way around to make your job easier. It allows for incremental language construction. Often, you start out small, implementing the atoms of your language first; parslet takes pride in making this possible.

Eager to try this out? Please see the associated web site: https://kschiess.github.io/parslet/

SYNOPSIS

require 'parslet' include Parslet

parslet parses strings

str('foo'). parse('foo') # => "foo"@0

it matches character sets

match['abc'].parse('a') # => "a"@0 match['abc'].parse('b') # => "b"@0 match['abc'].parse('c') # => "c"@0

and it annotates its output

str('foo').as(:important_bit). parse('foo') # => {:important_bit=>"foo"@0}

you can construct parsers with just a few lines

quote = str('"') simple_string = quote >> (quote.absent? >> any).repeat >> quote

simple_string. parse('"Simple Simple Simple"') # => ""Simple Simple Simple""@0

or by making a fuss about it

class Smalltalk = 1.9. I've tested it on MRI 1.9, rbx-head, jruby. Please report as a bug if you encounter issues.

STATUS

Production worthy.

(c) 2010-today Kaspar Schiess

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Ruby

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言