CARVIEW |
Select Language
HTTP/2 200
date: Thu, 24 Jul 2025 21:20:05 GMT
content-type: text/html; charset=utf-8
vary: X-PJAX, X-PJAX-Container, Turbo-Visit, Turbo-Frame, X-Requested-With,Accept-Encoding, Accept, X-Requested-With
etag: W/"db1fdd6aea8168ad6e4cfbb3201152d0"
cache-control: max-age=0, private, must-revalidate
strict-transport-security: max-age=31536000; includeSubdomains; preload
x-frame-options: deny
x-content-type-options: nosniff
x-xss-protection: 0
referrer-policy: no-referrer-when-downgrade
content-security-policy: default-src 'none'; base-uri 'self'; child-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/; connect-src 'self' uploads.github.com www.githubstatus.com collector.github.com raw.githubusercontent.com api.github.com github-cloud.s3.amazonaws.com github-production-repository-file-5c1aeb.s3.amazonaws.com github-production-upload-manifest-file-7fdce7.s3.amazonaws.com github-production-user-asset-6210df.s3.amazonaws.com *.rel.tunnels.api.visualstudio.com wss://*.rel.tunnels.api.visualstudio.com objects-origin.githubusercontent.com copilot-proxy.githubusercontent.com proxy.individual.githubcopilot.com proxy.business.githubcopilot.com proxy.enterprise.githubcopilot.com *.actions.githubusercontent.com wss://*.actions.githubusercontent.com productionresultssa0.blob.core.windows.net/ productionresultssa1.blob.core.windows.net/ productionresultssa2.blob.core.windows.net/ productionresultssa3.blob.core.windows.net/ productionresultssa4.blob.core.windows.net/ productionresultssa5.blob.core.windows.net/ productionresultssa6.blob.core.windows.net/ productionresultssa7.blob.core.windows.net/ productionresultssa8.blob.core.windows.net/ productionresultssa9.blob.core.windows.net/ productionresultssa10.blob.core.windows.net/ productionresultssa11.blob.core.windows.net/ productionresultssa12.blob.core.windows.net/ productionresultssa13.blob.core.windows.net/ productionresultssa14.blob.core.windows.net/ productionresultssa15.blob.core.windows.net/ productionresultssa16.blob.core.windows.net/ productionresultssa17.blob.core.windows.net/ productionresultssa18.blob.core.windows.net/ productionresultssa19.blob.core.windows.net/ github-production-repository-image-32fea6.s3.amazonaws.com github-production-release-asset-2e65be.s3.amazonaws.com insights.github.com wss://alive.github.com api.githubcopilot.com api.individual.githubcopilot.com api.business.githubcopilot.com api.enterprise.githubcopilot.com; font-src github.githubassets.com; form-action 'self' github.com gist.github.com copilot-workspace.githubnext.com objects-origin.githubusercontent.com; frame-ancestors 'none'; frame-src viewscreen.githubusercontent.com notebooks.githubusercontent.com; img-src 'self' data: blob: github.githubassets.com media.githubusercontent.com camo.githubusercontent.com identicons.github.com avatars.githubusercontent.com private-avatars.githubusercontent.com github-cloud.s3.amazonaws.com objects.githubusercontent.com release-assets.githubusercontent.com secured-user-images.githubusercontent.com/ user-images.githubusercontent.com/ private-user-images.githubusercontent.com opengraph.githubassets.com copilotprodattachments.blob.core.windows.net/github-production-copilot-attachments/ github-production-user-asset-6210df.s3.amazonaws.com customer-stories-feed.github.com spotlights-feed.github.com objects-origin.githubusercontent.com *.githubusercontent.com; manifest-src 'self'; media-src github.com user-images.githubusercontent.com/ secured-user-images.githubusercontent.com/ private-user-images.githubusercontent.com github-production-user-asset-6210df.s3.amazonaws.com gist.github.com; script-src github.githubassets.com; style-src 'unsafe-inline' github.githubassets.com; upgrade-insecure-requests; worker-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/
server: github.com
content-encoding: gzip
accept-ranges: bytes
set-cookie: _gh_sess=MEGX0ktNYAKO9%2BIXE6jci2LSKTVNlMZW69qKp00A22v1oa45JLj3Lu0npkGwuBG7scIi2TJg%2BNku0cyhE1umS0G4rup62oAIN7U0AkBj13EBSGmuKyowWGWyGCo5lQV2b1BnmeCebV8l4XkIs2Dw0seVxZHG5epEB1PY6RrVsIKWzTv8NMfZsj4AO9bAtTdTE9PkApo0PvgFKY30QCH%2FWf%2FVLq40ljjZq9P%2BaHxO80i3Zr%2FRow1Fa7dSo8Sx%2BQm9yAtohTb6MIWQ9OYFW5oqug%3D%3D--lD9Pk7gxqt3GUkyz--oIkgLcluPYVFZNe8pZlPyA%3D%3D; Path=/; HttpOnly; Secure; SameSite=Lax
set-cookie: _octo=GH1.1.1095926375.1753392004; Path=/; Domain=github.com; Expires=Fri, 24 Jul 2026 21:20:04 GMT; Secure; SameSite=Lax
set-cookie: logged_in=no; Path=/; Domain=github.com; Expires=Fri, 24 Jul 2026 21:20:04 GMT; HttpOnly; Secure; SameSite=Lax
x-github-request-id: D3D0:396336:89EE7:BDD50:6882A384
GitHub - kschiess/parslet: A small PEG based parser library. See the Hacking page in the Wiki as well.
Skip to content
Navigation Menu
{{ message }}
-
Notifications
You must be signed in to change notification settings - Fork 97
A small PEG based parser library. See the Hacking page in the Wiki as well.
License
kschiess/parslet
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
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 < Parslet::Parser root :smalltalk rule(:smalltalk) { statements } rule(:statements) { # insert smalltalk parser here (outside of the scope of this readme) } end # and then Smalltalk.new.parse('smalltalk') FEATURES * Tools for every part of the parser chain * Transformers generate Abstract Syntax Trees * Accelerators transform parsers, making them quite a bit faster * Pluggable error reporters * Graphviz export for your parser * Rspec testing support rig * Simply Ruby, composable and hackable COMPATIBILITY This library is intended to work with Ruby variants >= 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
About
A small PEG based parser library. See the Hacking page in the Wiki as well.
Resources
License
Stars
Watchers
Forks
Packages 0
No packages published
You can’t perform that action at this time.