cenotelie/hime

Build parser from grammar at runtime

Closed this issue · 2 comments

Hi!
Can I build a parser from grammar at runtime without generating any dll, bin etc?

Hi, yes this kind of scenario is supported, but only on the .Net platform. If you are using the Java or Rust runtime you will be out of luck.
There is a example of exactly this in the documentation at: https://cenotelie.fr/projects/hime/recipes/sdk

Unfortunately, it's not what I need. if I understood correctly CompilationTask generates dll. I want to get the objects only in memory and nothing should be saved on a disc. I want to create a natural language parser like https://github.com/natasha/yargy only on c#. I thought I could use hime RNGLR parser for it and simply by rewriting lexer. Now I know that it is more of a challenge than I thought. In any case, thank you for answering.