Question

Good day everyone,

I am currently experimenting with the ASIS tool for ADA programs. I was wondering if it was possible to directly modify the abstract syntax tree (.adt) generated during compilation. If so, can someone point me in the right direction as to how I can achieve this?

Thank you very much for your time.

Was it helpful?

Solution

I suspect that messing with abstract syntax tree files would be more work than it was worth.

Instead I would seriously consider using something like gnat2xml to generate the equivalent of the adt file as an XML file. Now you have the Ada syntax and semantic information in a form for which there exists a plethora of tools that can mess around with its structure and content. Once you've made whatever changes you want, run it back through xml2gnat to generate the altered Ada source code.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top