All Projects → RomanYankovsky → Delphiast

RomanYankovsky / Delphiast

Licence: mpl-2.0
Abstract syntax tree builder for Delphi

Programming Languages

pascal
1382 projects
delphi
115 projects

Projects that are alternatives of or similar to Delphiast

Verible
Verible is a suite of SystemVerilog developer tools, including a parser, style-linter, and formatter.
Stars: ✭ 384 (+102.11%)
Mutual labels:  syntax-tree
Decent Messup
Mess up js code in a different way
Stars: ✭ 84 (-55.79%)
Mutual labels:  syntax-tree
Astviewer
Python Abstract Syntax Tree viewer in Qt
Stars: ✭ 101 (-46.84%)
Mutual labels:  syntax-tree
Mdast
Markdown Abstract Syntax Tree format
Stars: ✭ 493 (+159.47%)
Mutual labels:  syntax-tree
Astexplorer.app
https://astexplorer.net with ES Modules support and Hot Reloading
Stars: ✭ 65 (-65.79%)
Mutual labels:  syntax-tree
Libdparse
Library for lexing and parsing D source code
Stars: ✭ 91 (-52.11%)
Mutual labels:  syntax-tree
Javaparser
Java 1-15 Parser and Abstract Syntax Tree for Java, including preview features to Java 13
Stars: ✭ 3,972 (+1990.53%)
Mutual labels:  syntax-tree
Reduce.jl
Symbolic parser generator for Julia language expressions using REDUCE algebra term rewriter
Stars: ✭ 172 (-9.47%)
Mutual labels:  syntax-tree
Myna Parser
Myna Parsing Library
Stars: ✭ 69 (-63.68%)
Mutual labels:  syntax-tree
Unist Util Visit
utility to visit nodes
Stars: ✭ 101 (-46.84%)
Mutual labels:  syntax-tree
Metric Parser
📜 AST-based advanced mathematical parser written by Typescript.
Stars: ✭ 26 (-86.32%)
Mutual labels:  syntax-tree
Calyx
A Ruby library for generating text with recursive template grammars.
Stars: ✭ 51 (-73.16%)
Mutual labels:  syntax-tree
Fall
Stars: ✭ 92 (-51.58%)
Mutual labels:  syntax-tree
Unist
Universal Syntax Tree used by @unifiedjs
Stars: ✭ 438 (+130.53%)
Mutual labels:  syntax-tree
Nlcst
Natural Language Concrete Syntax Tree format
Stars: ✭ 116 (-38.95%)
Mutual labels:  syntax-tree
Joern
Open-source code analysis platform for C/C++/Java based on code property graphs
Stars: ✭ 386 (+103.16%)
Mutual labels:  syntax-tree
Syntax Highlighter
Syntax Highlighter extension for Visual Studio Code (VSCode). Based on Tree-sitter.
Stars: ✭ 88 (-53.68%)
Mutual labels:  syntax-tree
Cppsharp
Tools and libraries to glue C/C++ APIs to high-level languages
Stars: ✭ 2,221 (+1068.95%)
Mutual labels:  syntax-tree
Calcit Editor
Intuitive S-expressions editing for Clojure(Script).
Stars: ✭ 158 (-16.84%)
Mutual labels:  syntax-tree
Genetic Programming
Symbolic regression solver, based on genetic programming methodology.
Stars: ✭ 98 (-48.42%)
Mutual labels:  syntax-tree

Abstract Syntax Tree Builder for Delphi

With DelphiAST you can take real Delphi code and get an abstract syntax tree. One unit at time and without a symbol table though.

FreePascal and Lazarus compatible.

Sample input

unit Unit1;

interface

uses
  Unit2;

function Sum(A, B: Integer): Integer;

implementation

function Sum(A, B: Integer): Integer;
begin
  Result := A + B;
end;

end.

Sample outcome

<UNIT line="1" col="1" name="Unit1">
  <INTERFACE begin_line="3" begin_col="1" end_line="10" end_col="1">
    <USES begin_line="5" begin_col="1" end_line="8" end_col="1">
      <UNIT line="6" col="3" name="Unit2"/>
    </USES>
    <METHOD begin_line="8" begin_col="1" end_line="10" end_col="1" kind="function" name="Sum">
      <PARAMETERS line="8" col="13">
        <PARAMETER line="8" col="14">
          <NAME line="8" col="14" value="A"/>
          <TYPE line="8" col="20" name="Integer"/>
        </PARAMETER>
        <PARAMETER line="8" col="17">
          <NAME line="8" col="17" value="B"/>
          <TYPE line="8" col="20" name="Integer"/>
        </PARAMETER>
      </PARAMETERS>
      <RETURNTYPE line="8" col="30">
        <TYPE line="8" col="30" name="Integer"/>
      </RETURNTYPE>
    </METHOD>
  </INTERFACE>
  <IMPLEMENTATION begin_line="10" begin_col="1" end_line="17" end_col="1">
    <METHOD begin_line="12" begin_col="1" end_line="17" end_col="1" kind="function" name="Sum">
      <PARAMETERS line="12" col="13">
        <PARAMETER line="12" col="14">
          <NAME line="12" col="14" value="A"/>
          <TYPE line="12" col="20" name="Integer"/>
        </PARAMETER>
        <PARAMETER line="12" col="17">
          <NAME line="12" col="17" value="B"/>
          <TYPE line="12" col="20" name="Integer"/>
        </PARAMETER>
      </PARAMETERS>
      <RETURNTYPE line="12" col="30">
        <TYPE line="12" col="30" name="Integer"/>
      </RETURNTYPE>
      <STATEMENTS begin_line="13" begin_col="1" end_line="15" end_col="4">
        <ASSIGN line="14" col="3">
          <LHS line="14" col="3">
            <IDENTIFIER line="14" col="3" name="Result"/>
          </LHS>
          <RHS line="14" col="13">
            <EXPRESSION line="14" col="13">
              <ADD line="14" col="15">
                <IDENTIFIER line="14" col="13" name="A"/>
                <IDENTIFIER line="14" col="17" name="B"/>
              </ADD>
            </EXPRESSION>
          </RHS>
        </ASSIGN>
      </STATEMENTS>
    </METHOD>
  </IMPLEMENTATION>
</UNIT>

Copyright

Copyright (c) 2014-2020 Roman Yankovsky ([email protected]) et al

DelphiAST is released under the Mozilla Public License, v. 2.0

See LICENSE for details.

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].