19 مستودعات
Tools that generate parsers based on formal grammar specifications to extract structured data from text.
Distinct from Grammar-Based Parsers: Unlike Grammar-Based Parsers [f6_mt2] which are the resulting parsers, this refers to the generator tool itself.
Explore 19 awesome GitHub repositories matching software engineering & architecture · Formal Grammar Parser Generators. Refine with filters or upvote what's useful.
ANTLR هو مولد كود قائم على القواعد ومولد محلل لغات متعدد يستخدم لتصميم وتنفيذ لغات مخصصة. يعمل كمجموعة أدوات لتحويل تعريفات اللغة الرسمية إلى كود مصدر قابل للتنفيذ لمعالجة النصوص المهيكلة أو الملفات الثنائية، مع توفير إطار عمل للبناء التلقائي واجتياز أشجار التحليل الهرمية. يتميز المشروع بقدرته على توليد lexers و parsers بلغات برمجة مستهدفة مختلفة من تعريف قواعد مشترك واحد. وهو يدعم القواعد التي تحتوي على تكرار يساري مباشر ويستخدم التنبؤ التكيفي لتحسين سرعة التحليل مع الحفاظ على المرونة. يغطي النظام مجموعة واسعة من القدرات، بما في ذلك التحليل المعجمي، والتحقق الدلالي عبر تقييم المسند، وإدارة البيانات الهرمية. يوفر أدوات لتحليل شجرة التحليل من خلال الاستعلام القائم على المسار وأنماط اجتياز الزائر-المستمع لفصل منطق القواعد عن إجراءات التطبيق. تتوفر أدوات سطر الأوامر لاختبار تعريفات القواعد ومنطق تصحيح الأخطاء، ويمكن تنفيذ الأداة داخل حاويات Docker لتجنب التثبيتات المحلية.
Generates lexer and parser source code for multiple target programming languages from a single grammar definition.
Semantic is a Haskell-based library and command-line tool designed for polyglot source code analysis. It functions as a static program analysis framework and a polyglot abstract syntax tree parser that converts multiple programming languages into structured syntax trees based on grammar definitions. The system distinguishes itself through a semantic code comparison engine that detects structural and meaningful changes between code versions rather than relying on textual differences. It further enables analysis across different programming syntaxes by translating surface languages into a unifi
Produces strongly typed abstract syntax trees by applying formal language grammar definitions to raw source text.
OCaml is a strongly typed functional language featuring a sophisticated type system and a focus on safety and expressiveness. It provides a comprehensive compiling toolchain that transforms source code into either portable bytecode or high-performance native binaries. The project is distinguished by a shared memory parallel runtime that executes computations across multiple processor cores using domains, and an algebraic effect system for managing side effects and control flow through execution context handlers. It also includes a dedicated parser generator to automatically create lexers and
Includes a dedicated parser generator to automatically create lexers and parsers from formal grammar specifications.
Lark هي مجموعة أدوات تحليل لـ Python تُستخدم لتعريف القواعد النحوية وتحويل النص الخام إلى أشجار تحليل مشروحة. تعمل كمولد لشجرة بناء الجملة المجردة ولغة تعريف قواعد نحوية لتحديد قواعد اللغة من خلال الرموز الطرفية والتعبيرات النمطية. توفر المكتبة تنفيذين أساسيين للتحليل: مكتبة تحليل Earley قادرة على التعامل مع جميع اللغات الخالية من السياق، بما في ذلك تلك التي تحتوي على غموض وعودية يسارية، ومكتبة تحليل LALR عالية الأداء مصممة للغات الحتمية ذات النفقات العامة المنخفضة للذاكرة. بعيداً عن التحليل الأساسي، تتضمن مجموعة الأدوات قدرات لتكوين القواعد النحوية المعيارية، وتحويل الشجرة القائم على القواعد، وتتبع الإحداثيات لمواقع المصدر. كما تدعم تسلسل قواعد LALR النحوية في وحدات محلل مستقلة.
Automatically generates hierarchical abstract syntax trees by matching input tokens against defined grammar rules.
Ohm هي مجموعة أدوات لبناء المترجمات ومكتبة دمج محللات (parser combinator) تُستخدم لبناء المحللات والمفسرات والمترجمات. توفر لغة قواعد رسمية لتحديد القواعد الهيكلية لتنسيقات البيانات لضمان تحليل دقيق لسلاسل الإدخال. يعمل المشروع كأداة لتصحيح أخطاء التحليل ومصور لتنفيذ البرامج. يقوم بإنشاء تتبعات نصية وتصورات رسومية لإظهار المنطق خطوة بخطوة المستخدم أثناء التحليل، ويعرض تغييرات حالة وقت التشغيل وتسلسلات استدعاء الدوال. تغطي مجموعة الأدوات تطوير المحللات المخصصة وبناء المترجمات والمفسرات. تتضمن إمكانيات لتصور لغات البرمجة، وتصحيح أخطاء تنفيذ الخوارزميات، وتعريف القواعد الرسمية.
Enables the definition of formal grammars to create structured representations of text input.
go-ast-book is a collection of educational and technical resources focused on abstract syntax tree analysis, compiler development, and static code verification. It provides guides and manuals for parsing, traversing, and analyzing Go source code to extract semantic meaning. The project serves as a reference for building compiler frontends, covering the translation of high-level code into intermediate representations and single static assignment forms. It also provides instructions for using these techniques to develop language tooling and perform static code analysis. The resources cover a b
Translates Go language constructs such as selector expressions and slice operations into AST structures.
Ohm is a formal grammar parser generator and domain-specific language framework. It provides a system for defining custom languages to parse, validate, and extract data from input text, transforming raw strings into hierarchical abstract syntax trees based on specified formal rules. The project utilizes an Earley parsing algorithm, which allows it to support all context-free grammars, including those with left recursion and ambiguity, without requiring predefined operator precedence. It also includes a dedicated debugging toolkit for tracing and visualizing the step-by-step state transitions
Provides a tool for defining custom languages using formal grammars to parse, validate, and extract data.
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
Automatically generates a functional parser implementation and error reporting from a defined formal grammar.
Racket هي لغة برمجة متعددة النماذج للأغراض العامة من عائلة Lisp مصممة لإنشاء اللغات. تعمل كمنصة عمل للغة، حيث توفر بيئة لتصميم وتنفيذ لغات برمجة مخصصة من خلال نظام مرن من الماكرو والوحدات. يتميز النظام بتقديم مجموعة شاملة لهندسة الدلالات، مما يسمح ببناء مجموعات لغوية متخصصة وطبقات تعليمية. يتضمن أدوات لتصميم اللغات المخصصة، مثل إنشاء المحلل اللغوي (lexer and parser)، بالإضافة إلى القدرة على تحديد قواعد توسيع الوحدات واختيار اللغة الديناميكي في وقت القراءة. يوفر المشروع بيئة تطوير متكاملة مع محرر مدمج، ومصحح أخطاء مرئي، ومدير حزم برمجية. تمتد إمكانياته إلى مكتبة قياسية للأغراض العامة تغطي عرض الرسومات ثنائية الأبعاد، ومعالجة البيانات الثنائية، وتكامل SQL وقواعد البيانات الاستنتاجية، وبناء واجهات المستخدم الرسومية. تدعم البيئة تجميع الكود المصدري في ملفات تنفيذية مستقلة للتوزيع.
Produces lexers and parsers from formal grammar specifications to convert token streams into structured representations.
PegJS is a parsing expression grammar tool and JavaScript parser generator. It functions as a grammar compiler that transforms formal grammar specifications into executable JavaScript code for analyzing structured text and processing complex input strings. The system generates deterministic parsers that avoid the ambiguity of context-free grammars. It utilizes a packrat parsing model with memoization to ensure linear time complexity and employs recursive descent parsing to process input in a top-down hierarchical manner. The toolset supports the implementation of domain-specific languages an
Functions as a tool that generates executable JavaScript parsers from formal grammar specifications.
Wuffs is a toolset for generating memory-safe, sandboxed parsers and decoders from domain-specific language specifications. It functions as a compiler that transforms these specifications into executable code for C, Go, or Rust, specifically designed to decode untrusted file formats while preventing buffer and integer overflows. The project employs a sandboxed execution model that prohibits system calls and manual memory management to ensure computations are side-effect free. It utilizes a refined type system and compile-time constraint verification to enforce memory safety, alongside saturat
A feature that translates a domain-specific language into executable code for other target environments such as Go or Rust.
Chumsky هي مكتبة دمج محلل (parser combinator) تُستخدم لبناء محللات عالية الأداء من خلال تكوين وظائف تحليل صغيرة في قواعد نحوية معقدة. توفر محركات تحليل متعددة، بما في ذلك تنفيذات النزول العودي وتسلق الأسبقية لحل ترتيب العمليات في التعبيرات الرياضية والمنطقية. تتميز المكتبة بتحليل النص بدون نسخ، مما يقلل من تخصيصات الذاكرة لزيادة الإنتاجية، وقدرتها على العمل بدون مكتبة قياسية للاستخدام في البيئات المضمنة أو محدودة الموارد. كما تتميز بمحلل استرداد الأخطاء الذي يحدد المدخلات المشوهة ويستأنف المعالجة للإبلاغ عن أخطاء نحوية متعددة في تمريرة واحدة. يغطي إطار العمل مجموعة واسعة من القدرات، بما في ذلك إدارة الحالة الحساسة للسياق، ودعم القواعد النحوية العودية، وتكامل أنماط التعبيرات النمطية. يتضمن أدوات لتحليل هيكل المحلل، وفحص العقدة، والتخزين المؤقت للنتائج لدعم التراجع والعودية اليسرى. تدعم المكتبة تطوير لغات مخصصة، وتحليل تنسيق البيانات، وأدوات لغة البرمجة.
Supports the development of custom parsers by defining formal grammars to derive structured representations of text.
Jison هو مولد محلل (Parser Generator) بلغة JavaScript ينفذ خوارزمية التحليل LALR. يقوم بإنشاء أدوات لتحليل لغات البرمجة المخصصة عن طريق تحويل المدخلات المهيكلة إلى رموز وأشجار. يعمل المشروع كمولد متوافق مع Bison، حيث يقبل القواعد النحوية بتنسيق متوافق مع مولد المحلل Bison لإنتاج محللات JavaScript. يغطي متطلبات تطوير واجهة المترجم (Compiler Frontend)، بما في ذلك تنفيذ اللغات الخاصة بالمجال (DSL) وأدوات تحليل النحو. تمتد قدراته إلى تحليل اللغات المخصصة وتوليد المحللات عبر واجهة سطر الأوامر.
Provides a tool that transforms formal grammar specifications into a functional JavaScript parser.
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
Transforms modular BNF-like language descriptions into functional parsers that handle recursive grammars.
Nearley is a JavaScript parser toolkit used to define context-free grammars and generate corresponding parsers. It features an EBNF grammar compiler that transforms language definitions written in extended Backus-Naur Form into executable JavaScript code, utilizing an Earley parser implementation to process any context-free grammar. The toolkit distinguishes itself by its ability to handle left-recursion and ambiguity without failing, allowing it to identify and return multiple valid derivations for a single input string. It also includes a grammar fuzzing generator to produce random strings
Compiles grammar definitions into typed languages to provide annotations and flexibility for post-processors.
pycparser is a C99 parser library that converts C source code into an abstract syntax tree consisting of Python objects. It functions as an abstract syntax tree generator, transforming preprocessed C code into a structured hierarchy for programmatic analysis and transformation. The library integrates with a C preprocessor to handle directives before parsing. It also features a stub header parser, which uses minimal mock headers to allow the parsing of C code without requiring a full system C library installation. The project provides tools for static code analysis, C program analysis, and so
Implements a C99 parsing engine generated from a formal grammar using the Python Lex-Yacc (PLY) framework.
Grule is a business rule engine for Go that decouples complex decision-making logic from core application code. It provides a framework for defining, versioning, and executing business rules through a domain-specific language, allowing logic to be managed independently of the underlying software implementation. The engine distinguishes itself by utilizing a formal grammar-based parser and a Rete-inspired pattern matching algorithm to evaluate logic against data facts efficiently. It supports dynamic system modeling by enabling runtime updates to policies and providing thread-safe knowledge ba
Generates parsers from formal grammar definitions to translate rule syntax into executable logic.
Railroad-diagrams هي أداة لإنشاء تمثيلات بصرية للقواعد الرسمية وهياكل اللغة. تعمل كمكتبة تحول أنظمة التدوين الكثيفة، مثل Backus-Naur Form أو التعبيرات العادية، إلى مخططات انسيابية قابلة للقراءة. تستخدم الأداة محرك تخطيط قائماً على الإحداثيات وتركيب مكونات متكرر لإنشاء مخططات كأشجار هرمية. من خلال فصل منطق الحساب الهندسي عن طبقة الإخراج، فإنها تدعم العرض من خلال الرسومات المتجهة القابلة للتوسع أو نص Unicode، مما يضمن بقاء المخططات واضحة وقابلة للتوسع عبر بيئات مختلفة. يمكن للمستخدمين ضبط المعلمات البصرية بما في ذلك تباعد الأسطر، والانحناء، ومحاذاة العناصر لتناسب متطلبات التوثيق المحددة. يمكن تصدير المخططات التي تم إنشاؤها كملفات صور مستقلة أو ترميز خام للدمج في الأدلة التقنية ومواصفات الويب.
Provides a utility for replacing dense BNF notation or regular expressions with clear, readable flowcharts.
This project is a high-performance semantic graph database engine designed for storing and querying massive RDF datasets. It functions as a specialized platform for managing linked data and complex relationship models, utilizing standard semantic web protocols to integrate and analyze distributed information sources. The system distinguishes itself through its use of B-Tree indexing to enable rapid traversal of relationships within large-scale datasets and its support for the Triple Pattern Fragments protocol to facilitate scalable web-based access. It provides automated tools for transformin
Transforms formal grammar definitions into executable source code to enable the parsing and processing of semantic queries.