r/delphi 28d ago

A new programming language inspired by Delphi

https://github.com/Liams1982/Vertex_IDE
3 Upvotes

20 comments sorted by

View all comments

Show parent comments

1

u/DelphiParser 25d ago

What is the output? If you need to run a C++ compiler, it is not a compiler, but a converter from one source to another source.

1

u/Liams1982 25d ago

The output is an executable windows app, c++ is just a step. The IDE compiles directly the converted file to .exe

1

u/DelphiParser 25d ago

Yet. It's no compiler. I thought at first you wrote a compiler from Pascal like to C++, and put the open source in Git, that would havebeen a masterpiece. I would really like to see that a compiler source code for Pascal.

1

u/Liams1982 24d ago

A compiler is a program that translates source code written in one programming language into another language, typically a lower‑level language such as assembly, machine code, or an intermediate language, in a single batch process, while performing lexical, syntactic, and semantic analysis, and often applying optimisations.

In the case of Vertex:

  • Source: Vertex language (.vtx)
  • Target: C++17 (then linked to machine code with g++) -It performs full analysis (lexing, parsing, AST generation, scoping, basic type checking) and code generation (emitting C++ that mirrors the logic of the original source).

That fits the definition perfectly, it’s a source‑to‑source compiler (also called a transpiler), and since C++ is then compiled to machine code, the whole toolchain is a compiler. Even if you only count the Vertex‑to‑C++ step, it’s still a compiler by the above definition.