Parse

Universal Language Engine - Build custom programming languages with a fluent API and compile them to native code via LLVM

Explore Features

Powerful Language Creation

🚀

Fluent API Design

Define language grammar rules with an intuitive, chainable API. No complex configuration files or external tools needed.

LLVM Backend

Generate optimized native code through LLVM IR. Your custom languages compile to fast, efficient machine code.

🎯

Runtime Processing

Define and process languages at runtime. No separate generation step - parse and compile in a single, seamless workflow.

🔧

Custom Callbacks

Hook into the parsing process with OnMatch callbacks to generate custom IR, perform semantic analysis, or build ASTs.

🌍

Universal Support

Create any language you can imagine - from simple DSLs to full programming languages. The only limit is your creativity.

📦

Pascal/Delphi Native

Built specifically for Pascal and Delphi developers, with clean interfaces and familiar patterns throughout.

See It In Action

Define a Pascal-like language and compile it to LLVM IR in just a few lines. This example creates a simple "Hello World" program with external function declarations.

Parse Example - Creating a Pascal-like Language
// Create your language engine var LParser: TPaParse; LParser := TPaParse.Create; // Set up the target module LParser.SetModuleName('HelloWorld'); // Define grammar rules with fluent API LParser .DefineRule('program_header') .Match('program') .MatchIdentifier() .Match(';') .OnMatch(procedure(const AContext: TPaParseContext) begin // Generate LLVM IR on match AContext.IR.TargetTriple(PaGetLLVMPlatformTargetTriple()); AContext.IR.DataLayout(PaGetLLVMPlatformDataLayout()); end); // Define function declarations LParser .DefineRule('function_declaration') .Match('function') .MatchIdentifier() .Rule('parameter_list') .Match(':') .MatchIdentifier() .OnMatch(procedure(const AContext: TPaParseContext) begin // Declare external functions in LLVM var LFuncType := AContext.IR.FunctionType(...); AContext.IR.DeclareFunction(AContext.Identifier, LFuncType); end); // Parse your source code const SOURCE = ''' program HelloWorld; function printf(format: PChar, ...): Int32; external "msvcrt.dll"; begin printf("Hello, World!"); end. '''; LResult := LParser.ParseText(SOURCE, 'HelloWorld.pas'); if LResult.Success then WriteLn('Compiled to LLVM IR successfully!');

Open Source & Ready to Use

Parse is free and open source. Start building your own languages today!

View on GitHub