Writing a dejargoniser - producing read ke analysis output in English that explains GDC / LDC asm code’s parameters and clobbers

Cecil Ward cecil at cecilward.com
Wed Apr 5 15:19:55 UTC 2023


How much code do you thing I would need to write for this? I’m 
still thinking about its feasibility. I don’t want to invent the 
wheel and write a custom parser by hand, so’d rather steal the 
code using sim eg called ‘a library’. :-)

The idea would be that the user could run this to sanity-check 
her understanding of the sometimes arcane GDC asm code 
outputs/inputs/clobbers syntax, and see what her asm code’s 
constraints are actually going to do rather than what she thinks 
it’s going to do. Clearly I can’t readily start parsing the asm 
body itself, I would just inspect the meta info. (If that’s the 
right word?)

I would have a huge problem with LDC’s alternative syntax unless 
I could think of some way to pre-transform and munge it into GDC 
format.

I do wish LDC (and DMD) would now converge on the GDC asm syntax. 
Do you think that’s reasonably doable?


More information about the Digitalmars-d-learn mailing list