awesome-repositories.com
Blog
awesome-repositories.com

Descubre los mejores repositorios open-source con nuestra búsqueda potenciada por IA.

ExplorarBúsquedas curadasAlternativas open-sourceSoftware autohospedableBlogMapa del sitio
ProyectoAcerca deCómo clasificamosPrensaServidor MCP
Aviso legalPrivacidadTérminos
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
·
pegjs avatar

pegjs/pegjs

0
View on GitHub↗
4,908 estrellas·421 forks·JavaScript·MIT·8 vistaspegjs.org↗

Pegjs

PegJS es una herramienta de gramática de expresión de análisis (parsing expression grammar) y generador de parsers para JavaScript. Funciona como un compilador de gramática que transforma especificaciones de gramática formal en código JavaScript ejecutable para analizar texto estructurado y procesar cadenas de entrada complejas.

El sistema genera parsers deterministas que evitan la ambigüedad de las gramáticas libres de contexto. Utiliza un modelo de parsing packrat con memoización para asegurar una complejidad de tiempo lineal y emplea parsing de descenso recursivo para procesar la entrada de manera jerárquica de arriba hacia abajo.

El conjunto de herramientas soporta la implementación de lenguajes específicos de dominio (DSL) y el desarrollo de lenguajes personalizados. Incluye capacidades para la definición recursiva de reglas gramaticales, acciones semánticas en línea para transformar texto coincidente en datos estructurados y predicados semánticos para coincidencias condicionales.

El motor de generación incluye opciones de configuración para equilibrar la velocidad de ejecución del parser resultante frente al tamaño final del código de salida.

Features

  • Formal Grammar Parser Generators - Functions as a tool that generates executable JavaScript parsers from formal grammar specifications.
  • Recursive Descent Parsers - Processes input strings using top-down hierarchical nesting of function calls to match grammar rules.
  • Custom Parsing Logic - The capability to run JavaScript code during the parsing process to transform matched data or trigger validation errors.
  • Input String Parsing - Processes text input using a generated parser to return structured results or detailed failure exceptions.
  • Programming Language Development - Provides the necessary tooling to create new programming or data languages by defining their formal grammars.
  • Domain Specific Languages - Enables the implementation of specialized languages for specific tasks by translating text into machine-readable formats.
  • Recursive Grammar Matching - Supports the definition of recursive matching rules using literals and character sets to describe structural layouts.
  • Semantic Actions - Embeds arbitrary JavaScript expressions within grammar rules to transform matched text into structured data objects.
  • Packrat Parsing - Utilizes a packrat parsing model with memoization to ensure linear time complexity for the generated parsers.
  • PEG Grammar Parsers - Provides a deterministic parser based on parsing expression grammars, avoiding the ambiguity of context-free grammars.
  • Parser Generators - Generates functional JavaScript code from parsing expression grammar definitions to analyze structured text.
  • JavaScript Component Generators - Translates parsing expression grammar definitions into functional JavaScript code for text analysis.
  • Custom Text Format Parsing - Processes complex input strings into structured data formats using formal parsing expression grammars.
  • Parser Generation Optimizations - A configuration option to balance execution speed against minimum code size for the generated parser output.
  • Dynamic Predicate Evaluation - Evaluates boolean expressions during the parse process to determine if a specific grammar rule should be applied.
  • Semantic Predicates - Evaluates JavaScript expressions during parsing to conditionally succeed or fail a match without consuming input.
  • Parsing Backtracking - Implements backtracking to allow the parser to explore alternative matching paths when a grammar rule fails.
  • Parsing Utilities - Parser generator for creating fast parsers.

Historial de estrellas

Gráfico del historial de estrellas de pegjs/pegjsGráfico del historial de estrellas de pegjs/pegjs

Búsqueda con IA

Explora más repositorios increíbles

Describe lo que necesitas en lenguaje sencillo: la IA clasifica miles de proyectos open-source curados por relevancia.

Start searching with AI

Alternativas open-source a Pegjs

Proyectos open-source similares, clasificados según cuántas características comparten con Pegjs.
  • pest-parser/pestAvatar de pest-parser

    pest-parser/pest

    5,355Ver en GitHub↗

    Pest is a Rust parsing library and automatic parser generator that transforms formal grammar definitions into functional parsers. It specializes in Parsing Expression Grammar to recognize and structure complex text patterns, providing a system for context-free grammar parsing. The library implements zero-copy tokenization and static grammar compilation to reduce runtime overhead. It supports no-std runtime compatibility, allowing the parser to be compiled for embedded or bare-metal environments where a standard library is unavailable. The project covers a range of parsing capabilities, inclu

    Rust
    Ver en GitHub↗5,355
  • antlr/antlr4Avatar de antlr

    antlr/antlr4

    18,928Ver en GitHub↗

    ANTLR is a grammar-based code generator and multi-language parser generator used to design and implement custom languages. It functions as a toolkit for transforming formal language definitions into executable source code for processing structured text or binary files, while providing a framework for automatically constructing and traversing hierarchical parse trees. The project is distinguished by its ability to generate lexers and parsers in various target programming languages from a single shared grammar definition. It supports grammars containing direct left recursion and utilizes adapti

    Java
    Ver en GitHub↗18,928
  • kach/nearleyAvatar de kach

    kach/nearley

    3,740Ver en GitHub↗

    Nearley is a JavaScript parser toolkit and context-free grammar compiler. It functions as an Earley parser generator that transforms BNF-like grammar definitions into executable code capable of analyzing text and generating abstract syntax trees. The project is distinguished by its ability to handle any context-free grammar, including those with left recursion and ambiguity, by maintaining multiple valid derivations for a single input. It further supports incremental parsing, allowing input strings to be processed in chunks to provide partial results and real-time feedback. Beyond core parsi

    JavaScript
    Ver en GitHub↗3,740
  • zaach/jisonAvatar de zaach

    zaach/jison

    4,385Ver en GitHub↗

    Jison is a JavaScript parser generator that implements the LALR parsing algorithm. It creates tools to analyze custom programming languages by converting structured input into tokens and trees. The project functions as a Bison-compatible generator, accepting grammars in a format compatible with the Bison parser generator to produce JavaScript parsers. It covers the requirements for compiler frontend development, including the implementation of domain-specific languages and syntax analysis tooling. Its capabilities extend to custom language parsing and the generation of parsers via a command

    JavaScript
    Ver en GitHub↗4,385
Ver las 30 alternativas a Pegjs→

Preguntas frecuentes

¿Qué hace pegjs/pegjs?

PegJS es una herramienta de gramática de expresión de análisis (parsing expression grammar) y generador de parsers para JavaScript. Funciona como un compilador de gramática que transforma especificaciones de gramática formal en código JavaScript ejecutable para analizar texto estructurado y procesar cadenas de entrada complejas.

¿Cuáles son las características principales de pegjs/pegjs?

Las características principales de pegjs/pegjs son: Formal Grammar Parser Generators, Recursive Descent Parsers, Custom Parsing Logic, Input String Parsing, Programming Language Development, Domain Specific Languages, Recursive Grammar Matching, Semantic Actions.

¿Qué alternativas de código abierto existen para pegjs/pegjs?

Las alternativas de código abierto para pegjs/pegjs incluyen: pest-parser/pest — Pest is a Rust parsing library and automatic parser generator that transforms formal grammar definitions into… antlr/antlr4 — ANTLR is a grammar-based code generator and multi-language parser generator used to design and implement custom… kach/nearley — Nearley is a JavaScript parser toolkit and context-free grammar compiler. It functions as an Earley parser generator… zaach/jison — Jison is a JavaScript parser generator that implements the LALR parsing algorithm. It creates tools to analyze custom… alecthomas/participle — Participle is a Go parser generator and toolkit for building language frontends. It provides a declarative grammar… hyperjumptech/grule-rule-engine — Grule is a business rule engine for Go that decouples complex decision-making logic from core application code. It…