Compiler example #1052
Unanswered
NeoCortex97
asked this question in
Q&A
Replies: 2 comments
-
|
Got something to add already: |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
I wrote a compiler/interpreter with Lark: https://github.com/erezsh/Preql/ It also implements imports. You can also look at https://craftinginterpreters.com/ I haven't checked, buy EQL might also fit the bill, since it uses Lark: https://github.com/endgameinc/eql |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi everyone,
I want to build some tool, that transforms a simple project definition language into a set of scripts to setup the project, install tooling, etc. And I want to generate a buildsystem and package manager config for the project.
That far on my dreams.
Normally I would build the parser part and stuff in C/C++ and wrap it so I can use it with python. I already found guides to do that, but fould lark before I tried.
Lark looks worlds more compelling to me, so I would gladly take a hit at using ist. But I failed to find an example that shows a basic way to build a Compiler or transpiler, so I wanted to ask around if somebody here already built a compiler that I can look at. And if you would be willing to discuss with me, how I could possibly build it.
So you know all relevant things, I would talk some more about the things that can belong to lark.
I want to be able to start it with a script file and it should interpret it. I want the option to drop into a repl from inside the script, so I would need to replicate some state between repl and compiler.
I want to start the repl from the get go and would like to keep a history and on close analyze the history and generate a script from it. Maybe run some analysis on the history so the generated code does make sense. The generation part is not of interest here.
And I wanted to ask if you know a guide or book how to structure a language grammar so it is easy to interpret and write.
Thanks for your time and patience with me. I'm a cs student that didn't take an compiler building, course yet, but is royally fedup with cmake syntax...
NeoCotex97
Beta Was this translation helpful? Give feedback.
All reactions