goparsify - golang parser-combinator library

  •        215

A parser-combinator library for building easy to test, read and maintain parsers using functional composition. Everything should be unicode safe by default, but you can opt out of unicode whitespace for a decent ~20% performance boost.



Related Projects

csstree - A tool set for working with CSS including fast detailed parser, walker, generator and lexer based on W3C specs and browser implementations

  •    Javascript

CSSTree is a tool set to work with CSS, including fast detailed parser (string->AST), walker (AST traversal), generator (AST->string) and lexer (validation and matching) based on knowledge of spec and browser implementations. The main goal is to be efficient and W3C spec compliant, with focus on CSS analyzing and source-to-source transforming tasks. NOTE: The project is in alpha stage since some parts need further improvements, AST format and API are subjects to change. However it's stable enough and used by packages like CSSO (CSS minifier) and SVGO (SVG optimizer) in production.

cppast - Library to parse and work with the C++ AST

  •    C++

Library interface to the C++ AST — parse source files, synthesize entities, get documentation comments and generate code. If you're writing a tool that needs access to the C++ AST (i.e. documentation generator, reflection library, …), your only option apart from writing your own parser is to use clang. It offers three interfaces for tools, but the only one that really works for standalone applications is libclang. However, libclang has various limitations and does not expose the entire AST.

nom - Rust parser combinator framework

  •    Rust

nom is a parser combinators library written in Rust. Its goal is to provide tools to build safe parsers without compromising the speed or memory consumption. To that end, it uses extensively Rust's strong typing and memory safety to produce fast and correct parsers, and provides macros and traits to abstract most of the error prone plumbing. If you need any help developing your parsers, please ping geal on IRC (mozilla, freenode, geeknode, oftc), go to #nom on Mozilla IRC, or on the Gitter chat room.

lark - A modern parsing library for Python, implementing Earley & LALR(1) and an easy interface

  •    Python

Beginners: Lark is not just another parser. It can parse any grammar you throw at it, no matter how complicated or ambiguous, and do so efficiently. It also constructs a parse-tree for you, without additional code on your part. Experts: Lark lets you choose between Earley and LALR(1), to trade-off power and speed. It also contains a CYK parser and experimental features such as a contextual-lexer.

php-parser - PHP parser written in Go

  •    Go

This project uses goyacc and golex libraries to parse PHP sources into AST. It can be used to write static analysis, refactoring, metrics, code style formatting tools. Dump AST to stdout.

ANLP - Another .NET Lexer Parser

  •    Silverlight

This project aims to have a lexer/parser working in Silverlight and help people to write their own grammar and make the lexer/parser available in Silverlight.

TagSoup - HTML/XML parser for Haskell

  •    Haskell

TagSoup is a library for parsing HTML/XML. It supports the HTML 5 specification, and can be used to parse either well-formed XML, or unstructured and malformed HTML from the web. The library also provides useful functions to extract information from an HTML document, making it ideal for screen-scraping.

language - A fast PEG parser written in JavaScript with first class errors

  •    Objective-J

Language.js is an experimental new parser based on PEG (Parsing Expression Grammar), with the special addition of the "naughty OR" operator to handle errors in a unique new way. It makes use of memoization to achieve linear time parsing speed, and support for automatic cut placement is coming to maintain mostly constant space as well (for a discussion of cut operators see: The most unique addition Language.js makes to PEG is how it handles errors. No parse ever fails in Language.js, instead SyntaxErrorNodes are placed into the resultant tree. This makes it trivial to do things like write syntax highlighters that have live error reporting. This also means that Language.js is very competent at handling multiple errors (as opposed to aborting on the first one that is reached).

scala-parser-combinators - simple combinator-based parsing for Scala

  •    Scala

This library is now community-maintained. If you are interested in helping please contact @gourlaysama or mention it on Gitter. As of Scala 2.11, this library is a separate jar that can be omitted from Scala projects that do not use Parser Combinators.

parsimmon - A monadic LL(infinity) parser combinator library for javascript

  •    Javascript

Parsimmon is a small library for writing big parsers made up of lots of little parsers. The API is inspired by parsec and Promises/A+. Parsimmon supports IE7 and newer browsers, along with Node.js. It can be used as a standard Node module through npm (named parsimmon), or directly in the browser through a script tag, where it exports a global variable called Parsimmon. To download the latest browser build, use the unpkg version. For more information on how to use unpkg, see the unpkg homepage.

Ragel lexer and Bison parser integration example

  •    C++

This a sample of win(bison) parser and Ragel lexer integration, with unicode support

espree - An Esprima-compatible JavaScript parser

  •    Javascript

Espree started out as a fork of Esprima v1.2.2, the last stable published released of Esprima before work on ECMAScript 6 began. Espree is now built on top of Acorn, which has a modular architecture that allows extension of core functionality. The goal of Espree is to produce output that is similar to Esprima with a similar API so that it can be used in place of Esprima. The primary goal is to produce the exact same AST structure and tokens as Esprima, and that takes precedence over anything else. (The AST structure being the ESTree API with JSX extensions.) Separate from that, Espree may deviate from what Esprima outputs in terms of where and how comments are attached, as well as what additional information is available on AST nodes. That is to say, Espree may add more things to the AST nodes than Esprima does but the overall AST structure produced will be the same.

combine - A parser combinator library for Rust

  •    Rust

An implementation of parser combinators for Rust, inspired by the Haskell library Parsec. As in Parsec the parsers are LL(1) by default but they can opt-in to arbitrary lookahead using the try combinator. Larger examples can be found in the examples, tests and benches folders.

ast-types - Esprima-compatible implementation of the Mozilla JS Parser API

  •    Javascript

This module provides an efficient, modular, Esprima-compatible implementation of the abstract syntax tree type hierarchy pioneered by the Mozilla Parser API. Because it understands the AST type system so thoroughly, this library is able to provide excellent node iteration and traversal mechanisms.

nimble_parsec - A simple and fast library for text-based parser combinators

  •    Elixir

Online Documentation. NimbleParsec is a simple and fast library for text-based parser combinators.

url-pattern - easier than regex string matching patterns for urls and other strings

  •    CoffeeScript

easier than regex string matching patterns for urls and other strings. turn strings into data or data into strings.a pattern is immutable after construction. none of its methods changes its state. that makes it easier to reason about.

tolerant-php-parser - An early-stage PHP parser designed for IDE usage scenarios.

  •    PHP

This is an early-stage PHP parser designed, from the beginning, for IDE usage scenarios (see Design Goals for more details). There is still a ton of work to be done, so at this point, this repo mostly serves as an experiment and the start of a conversation.After you've configured your machine, you can use the parser to generate and work with the Abstract Syntax Tree (AST) via a friendly API.

useragent - Useragent parser for Node.js, ported from

  •    Javascript

Useragent originated as port of's user agent parser project also known as ua-parser. Useragent allows you to parse user agent strings with high performance and accuracy by using hand tuned regular expressions for browser matching. This database is needed to ensure that every browser is correctly parsed as every browser vendor implements it's own user agent schema. This is why regular user agent parsers have major issues because they will most likely parse out the wrong browser name or confuse the render engine version with the actual version of the browser. This module relies on uap-core's regexes.yaml user agent database to parse user agent strings.

flexmark-java - CommonMark/Markdown Java parser with source level AST

  •    Java

Java re-implementation of commonmark-java based parser, with AST reflecting source elements, full source position tracking, greater parser extensibility.

We have large collection of open source products. Follow the tags from Tag Cloud >>

Open source products are scattered around the web. Please provide information about the open source projects you own / you use. Add Projects.