Hi and let me be the first to congratulate you on what (at a very quick glance) looks to be very impressive work - on many levels!
I haven’t done a proper deep-dive into the sourcecode yet, but this will definitely motivate me to also get more familiar with Rust.
There is many parts about your approach that aligns with my own ideas for a toy language compiler, and I look forwards to study it closer and follow your future progress.
I do have some questions around the scanner, lexer, parser parts - regarding modularity and possible decoupling from the python grammar.
Would it be possible to have the parsing rules defined in some form of traversable data structure that the different modules just iterate over without it affecting performance too much - or is it just to integrated with the code generator bits to be worth it?
Most other parsing libs I’ve seen so far is either generated by yacc / bison type tools, to what I personally consider a rather ugly output - or they start out with string encoded BNF/PEG type rules when I’m on the lookout for a middle ground where there’s an API (or just predefined structs) for defining the actual syntax rules and corresponding actions.
Maybe I’ll just give it a go and see what I might cook up… or more likely, break, locally. 🤣
Hi and let me be the first to congratulate you on what (at a very quick glance) looks to be very impressive work - on many levels!
I haven’t done a proper deep-dive into the sourcecode yet, but this will definitely motivate me to also get more familiar with Rust.
There is many parts about your approach that aligns with my own ideas for a toy language compiler, and I look forwards to study it closer and follow your future progress.
I do have some questions around the scanner, lexer, parser parts - regarding modularity and possible decoupling from the python grammar.
Would it be possible to have the parsing rules defined in some form of traversable data structure that the different modules just iterate over without it affecting performance too much - or is it just to integrated with the code generator bits to be worth it?
Most other parsing libs I’ve seen so far is either generated by yacc / bison type tools, to what I personally consider a rather ugly output - or they start out with string encoded BNF/PEG type rules when I’m on the lookout for a middle ground where there’s an API (or just predefined structs) for defining the actual syntax rules and corresponding actions.
Maybe I’ll just give it a go and see what I might cook up… or more likely, break, locally. 🤣