awesome-repositories.com
Blog
awesome-repositories.com

Descoperă cele mai bune repository-uri open source cu căutare AI.

ExploreazăCăutări recomandateAlternative open-sourceSoftware self-hostedBlogHartă site
ProiectDespreCum realizăm clasamentulPresăServer MCP
LegalConfidențialitateTermeni
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
·
pegjs avatar

pegjs/pegjs

0
View on GitHub↗
4,908 stele·421 fork-uri·JavaScript·MIT·8 vizualizăripegjs.org↗

Pegjs

PegJS este un instrument de gramatică de expresii de parsare și un generator de parser JavaScript. Funcționează ca un compilator de gramatică care transformă specificațiile formale de gramatică în cod JavaScript executabil pentru analizarea textului structurat și procesarea șirurilor de intrare complexe.

Sistemul generează parsere deterministe care evită ambiguitatea gramaticilor libere de context. Utilizează un model de parsare packrat cu memoizare pentru a asigura complexitatea de timp liniară și folosește parsarea prin coborâre recursivă pentru a procesa intrarea într-o manieră ierarhică de sus în jos.

Setul de instrumente suportă implementarea limbajelor specifice domeniului și dezvoltarea de limbaje personalizate. Include capabilități pentru definirea recursivă a regulilor gramaticale, acțiuni semantice inline pentru transformarea textului potrivit în date structurate și predicate semantice pentru potrivire condiționată.

Motorul de generare include opțiuni de configurare pentru a echilibra viteza de execuție a parserului rezultat față de dimensiunea finală a codului de ieșire.

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.

Istoric stele

Graficul istoricului de stele pentru pegjs/pegjsGraficul istoricului de stele pentru pegjs/pegjs

Căutare AI

Explorează mai multe repository-uri excelente

Descrie ce ai nevoie în limbaj simplu — AI-ul sortează mii de proiecte open source selectate în funcție de relevanță.

Start searching with AI

Alternative open-source pentru Pegjs

Proiecte open-source similare, clasificate după numărul de funcționalități comune cu Pegjs.
  • pest-parser/pestAvatar pest-parser

    pest-parser/pest

    5,355Vezi pe 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
    Vezi pe GitHub↗5,355
  • antlr/antlr4Avatar antlr

    antlr/antlr4

    18,928Vezi pe 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
    Vezi pe GitHub↗18,928
  • kach/nearleyAvatar kach

    kach/nearley

    3,740Vezi pe 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
    Vezi pe GitHub↗3,740
  • zaach/jisonAvatar zaach

    zaach/jison

    4,385Vezi pe 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
    Vezi pe GitHub↗4,385
Vezi toate cele 30 alternative pentru Pegjs→

Întrebări frecvente

Ce face pegjs/pegjs?

PegJS este un instrument de gramatică de expresii de parsare și un generator de parser JavaScript. Funcționează ca un compilator de gramatică care transformă specificațiile formale de gramatică în cod JavaScript executabil pentru analizarea textului structurat și procesarea șirurilor de intrare complexe.

Care sunt principalele funcționalități ale pegjs/pegjs?

Principalele funcționalități ale pegjs/pegjs sunt: Formal Grammar Parser Generators, Recursive Descent Parsers, Custom Parsing Logic, Input String Parsing, Programming Language Development, Domain Specific Languages, Recursive Grammar Matching, Semantic Actions.

Care sunt câteva alternative open-source pentru pegjs/pegjs?

Alternativele open-source pentru pegjs/pegjs includ: 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…