cenotelie / hime

Apache License 2.0
27 stars 4 forks source link

Build parser from grammar at runtime #74

Closed QsROg8320 closed 3 years ago

QsROg8320 commented 3 years ago

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

woutersl commented 3 years ago

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

QsROg8320 commented 3 years ago

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.