Re: ANN: Ada source code decorator



Jeffrey R. Carter wrote:
Stephen Leake wrote:

I don't see how that is remotely possible. The whole point of ASIS is
to access the knowledge the compiler has about the source. Thus the
compiler has to provide functions to access that knowledge.

The compiler could provide a representation of its knowledge of the
source that uses XML. For example, internal trees (or graphs), where
the nodes carry information not only about names, etc, but also
about representations. Trees, or groves, are an ideal candidate for
XML based representation because an XML document instance is a tree
or graph, and XML based tools are made for working on these.

In fact, ASIS and XML use almost the same wording, e.g. element
trees.

The point of ASIS is to provide a standard way to access information about the source that the compiler has saved. The format of this information is not specified. I suspect Wright is hoping an Ada-0X version of ASIS will specify the format, using XML.

If ASIS were to provide a set of XML element definitions,
these could be used to write transformations to and from XMI,
easing the use of Ada with some OOD tools.
Getting a sorted index of all tagged types in a program will then
be very easy with XML tools: just declare the corresponding XPath
choice and employ XSL's sort and key functions. Done.

Which leads me to a question: Is there a set of "ASIS items" that
you use frequently? Items that could be useful when represented
using XML, even when the Ada information contained therein is limited?


-- Georg .



Relevant Pages

  • Re: ANN: Ada source code decorator
    ... compiler has to provide functions to access that knowledge. ... The point of ASIS is to provide a standard way to access information ... version of ASIS will specify the format, using XML. ...
    (comp.lang.ada)
  • Re: ANN: Ada source code decorator
    ... compiler has to provide functions to access that knowledge. ... The point of ASIS is to provide a standard way to access information ... I have not used XML processors, so I can't comment on whether they are ... I would love an ASIS export utility that provides the full ASIS-accesible information about a single compilation unit as a single XML document. ...
    (comp.lang.ada)
  • Re: next ISO/ANSI standard for C++
    ... > to XML widespread-ness, but mostly to the length of one's career, no? ... 3rd party libraries. ... Wouldn't it be good to just provide a standard ... The more the compiler has to decide, the less probable it is to ...
    (comp.lang.cpp)
  • XML-based object orientated pre-Assembler
    ... I have been promising an object orientated ASM IDE for a while now. ... Trying to make the best of what is already here, I have made a compiler, ... that will parse XML code and output ASM files. ...
    (alt.lang.asm)
  • Re: xml as intermediate representation
    ... > [I agree that if you're going to pass stuff from phase to phase, XML ... otherwise have a tendency to tie you closely in to both the compiler ... writers preferred language and data model. ... data would give a tremendous amount of flexibility, ...
    (comp.compilers)