On Tue, Jun 11, 2019 at 11:35 PM Barry Scott firstname.lastname@example.org wrote:
Some times a DSL is usable within the python syntax and that is great. I have use python for a number of DSL's.
But when the DSL is beyond what python can help with directly I'm wondering why you do not parse the DSL with python and execute the results.
In that way you can have any semantics that you want from any syntax that you wish to have. However you do not need the python language to be changed at all.
And it must be clear that you are making little to no progress on convincing people that changing python is a good idea.
Hi Barry, realized that. Please do allow me sometime for formalize everything. You are absolutely right in that writing a new parser might not be a bad idea, but it is just soooo close for enabling Python to be used as the DSL language. We do not even need a DSL for HDL in this case, as Python can co-simulate with any HDL simulator that supports VPI/DPI/etc., but writing a full featured HDL is really just a few hundred of lines of code which enables you to throw away the entire HDL simulator (hundreds of thousands of lines, plus another hundreds of lines of glue code in between python and HDL simulator. Develop a dedicated parser eventually is NOT saving much more effort than using existing ones. And more importantly is the integration of Python and the DSL, as we want to use Python not only the write hardware, but write test for hardware which can be far more complex than the hardware itself. And python's ability to allow develop new test scenarios fast is the key here.