comp.lang.ada
 help / color / mirror / Atom feed
From: Simon Wright <simon@pushface.org>
Subject: Re: Parsing Ada?
Date: Wed, 03 Jun 2015 12:04:34 +0100
Date: 2015-06-03T12:04:34+01:00	[thread overview]
Message-ID: <lywpzlvyrh.fsf@pushface.org> (raw)
In-Reply-To: 85mw0hte8w.fsf@stephe-leake.org

Stephen Leake <stephen_leake@stephe-leake.org> writes:

> Note that ASIS does not produce a parse tree either; it just gives you
> structured access to the source. ASIS code tends to feel like a
> recursive descent parser (at least, for the tools I've written in
> ASIS).

You might find ASIS2XML[1] helpful (it doesn't attempt to retain
comments, and really only retains textual information (that is, it
retains the name in an entity reference but not the links to the
referenced entity). Also, could do some cleanup of compound identifiers
- it retains the ASIS structure; so "with Ada.Characters.Handling;"
becomes

      <with_clause>
        <selected_component>
          <selected_component>
            <identifier>Ada</identifier>
            <identifier>Characters</identifier>
          </selected_component>
          <identifier>Handling</identifier>
        </selected_component>
      </with_clause>

Also Avatox[2].

The ASIS GPL 2014 source distribution contains a tool gnat2xml which
doesn't appear to be installed automatically. I didn't like the schema
very much, can't remember why now!

You'd probably use xslt to work with the generated XML.

[1] https://sourceforge.net/projects/asis2xml/
[2] Original site unavailable. See the ASIS GPL 2014 distro,
    tools/gnat2xml for READMEs; I have a copy of avatox-1.8.tgz if you
    want.

  parent reply	other threads:[~2015-06-03 11:04 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-02 11:33 Parsing Ada? Jacob Sparre Andersen
2015-06-02 12:09 ` G.B.
2015-06-02 12:36   ` Jacob Sparre Andersen
2015-06-02 14:47   ` Luke A. Guest
2015-06-02 16:36 ` Dmitry A. Kazakov
2015-06-03 22:39   ` Randy Brukardt
2015-06-04  7:45     ` Dmitry A. Kazakov
2015-06-03  7:58 ` Stephen Leake
2015-06-03  8:36   ` J-P. Rosen
2015-06-03 11:04   ` Simon Wright [this message]
2015-06-04  6:59   ` Jacob Sparre Andersen
2015-06-04 10:24     ` J-P. Rosen
2015-06-04 12:15     ` jan.de.kruyf
2015-06-04 12:30       ` jan.de.kruyf
2015-06-05  8:02     ` Simon Wright
2015-06-08  7:53       ` Jacob Sparre Andersen
2015-06-05  9:34     ` Stephen Leake
2015-06-08  8:34       ` Jacob Sparre Andersen
2015-06-08 22:45 ` wowwomenonwheels205
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox