All Projects → Leandros → PackCC

Leandros / PackCC

Licence: MIT license
PackCC is a packrat parser generator for C.

Programming Languages

c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to PackCC

peg
Import of Ian Piumarta's peg/leg recursive-descent parser generators for C
Stars: ✭ 41 (+86.36%)
Mutual labels:  parser-generator, recursive-descent
lilt
LILT: noun, A characteristic rising and falling of the voice when speaking; a pleasant gentle accent.
Stars: ✭ 18 (-18.18%)
Mutual labels:  parser-generator
Irony
A modified version of the Irony project (https://irony.codeplex.com) with .NET Core support
Stars: ✭ 127 (+477.27%)
Mutual labels:  parser-generator
Tatsu
竜 TatSu generates Python parsers from grammars in a variation of EBNF
Stars: ✭ 198 (+800%)
Mutual labels:  parser-generator
Csly
a C# embeddable lexer and parser generator (.Net core)
Stars: ✭ 129 (+486.36%)
Mutual labels:  parser-generator
kiuatan
A parser library for Pony.
Stars: ✭ 15 (-31.82%)
Mutual labels:  parser-generator
Antlr4
ANTLR (ANother Tool for Language Recognition) is a powerful parser generator for reading, processing, executing, or translating structured text or binary files.
Stars: ✭ 11,227 (+50931.82%)
Mutual labels:  parser-generator
DirectFire Converter
DirectFire Firewall Converter - Network Security, Next-Generation Firewall Configuration Conversion, Firewall Syntax Translation and Firewall Migration Tool - supports Cisco ASA, Fortinet FortiGate (FortiOS), Juniper SRX (JunOS), SSG / Netscreen (ScreenOS) and WatchGuard (support for further devices in development). Similar to FortiConverter, Sm…
Stars: ✭ 34 (+54.55%)
Mutual labels:  parser-generator
usfm-grammar
An elegant USFM parser.
Stars: ✭ 29 (+31.82%)
Mutual labels:  parser-generator
Reduce.jl
Symbolic parser generator for Julia language expressions using REDUCE algebra term rewriter
Stars: ✭ 172 (+681.82%)
Mutual labels:  parser-generator
Pegparser
💡 Build your own programming language! A C++17 PEG parser generator supporting parser combination, memoization, left-recursion and context-dependent grammars.
Stars: ✭ 164 (+645.45%)
Mutual labels:  parser-generator
Lalrpop
LR(1) parser generator for Rust
Stars: ✭ 1,929 (+8668.18%)
Mutual labels:  parser-generator
tree-sitter-cli
CLI tool for creating and testing tree-sitter parsers
Stars: ✭ 43 (+95.45%)
Mutual labels:  parser-generator
Php Zephir Parser
The Zephir Parser delivered as a C extension for the PHP language.
Stars: ✭ 129 (+486.36%)
Mutual labels:  parser-generator
abnf parsec
ABNF in, parser out
Stars: ✭ 42 (+90.91%)
Mutual labels:  parser-generator
Gogll
Generates generalised LL (GLL) and reduced size LR(1) parsers with matching lexers
Stars: ✭ 125 (+468.18%)
Mutual labels:  parser-generator
Npeg
PEGs for Nim, another take
Stars: ✭ 163 (+640.91%)
Mutual labels:  parser-generator
dropincc.java
A small and easy to use parser generator. Specify your grammar in pure java and compile dynamically. Especially suitable for DSL creation in java.
Stars: ✭ 90 (+309.09%)
Mutual labels:  parser-generator
lalr
Modern LALR(1) parser for C++
Stars: ✭ 56 (+154.55%)
Mutual labels:  parser-generator
kison
A LALR(1)/LL(1)/LL(K) parser generator for javascript/typescript
Stars: ✭ 40 (+81.82%)
Mutual labels:  parser-generator

PackCC

PackCC is a packrat parser generator for C. Its defining features are:

  • Generates your parser in C from a grammar described in a PEG
  • Gives your parser great efficiency by packrat parsing
  • Supports direct and indirect left-recursive grammar rules

Some additional features include:

  • Thread-safe and reentrant
  • Generates compact and readable source
  • Consists of just a single compact source file
  • Licensed under MIT

The algorithm is based on the paper "Packrat Parsers Can Support Left Recursion" authored by A. Warth, J. R. Douglass, and T. Millstein.

Installation

PackCC consists of just a single compact source file packcc.c. To create the executable, just compile it:

cc -o packcc src/packcc.c

Usage

You must prepare a PEG source file (see the documentation). In our example the file is named example.peg:

packcc example.peg

By running this, the files example.h and example.c are generated.

If no PEG file name is specified, the PEG source is read from the standard input, and -.h and -.c are generated.

The base name of the parser source files can be changed by -o option.

packcc -o parser example.peg

By running this, the files parser.h and parser.c are generated.

Documentation

The docs/ directory contains the full documentation.

Alternatively, the full docs can be found at https://leandros.github.io/PackCC

License

MIT License

Copyright (c) 2014 Arihiro Yoshida Copyright (c) 2017 Arvid Gerstmann

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].