[llvm-dev] General question - better descriped.

Steven Truppe via llvm-dev llvm-dev at lists.llvm.org
Thu Jun 20 11:01:56 PDT 2019


Hi everyone,

i'm currently trying to write an application that let you "code" with
nodes. (think of a node like a function that has input and output slots
that can get connected).


I need a few functions that are predefined and can be used in the code
(so i want to parse and create an AST for those functions/variables and
then i need to parse C++ code (one node has c++ code that should be
executed. So in the end i've nodes that are for types, then one for
operations (the functions).


The code from the nodes must be able to run the code from it's node with
the parameters i pass to the node's slots or in the node itself and i
need it to be able to create own functions that must be available in the
code of the nodes.


so for example i've a typenode that declares and defines variables, for
example vec3f for 3d vector types.


Now my question would be: Where should i start reading or is there a
special article how to achive what i want ?? As far as i know i need
clang to parse my own functions so he knows about my types and my
functions (one for each operation nodes and the structure declarations).
this creates one AST for each type/function). then i need to build an
AST for my own nodes that must be interpreted and compiled with llvm and
then run the code at runtime.


I hope one of you guys can point me in the right direction because i'm
completely new to clang and llvm (but i found a book about "learning
llvm basic libaries that helps a bit but they do not talk much about
clang (so i only know the basics about llvm and have not much of a clue
about clang.


best regards,

Steven Truppe



More information about the llvm-dev mailing list