diff options
author | Bob Duff <duff@adacore.com> | 2018-01-11 08:53:32 +0000 |
---|---|---|
committer | Pierre-Marie de Rodat <pmderodat@gcc.gnu.org> | 2018-01-11 08:53:32 +0000 |
commit | e22e7f06331fed25942cd3629e00fc2bfe1a8dc4 (patch) | |
tree | 8d463be783da9b1d2f53d078863e6a1a97d8e8f6 | |
parent | 8207dc2311d761ddff0de5d0a2e8a72dc4e94e78 (diff) | |
download | gcc-e22e7f06331fed25942cd3629e00fc2bfe1a8dc4.zip gcc-e22e7f06331fed25942cd3629e00fc2bfe1a8dc4.tar.gz gcc-e22e7f06331fed25942cd3629e00fc2bfe1a8dc4.tar.bz2 |
[Ada] Improve documentation of xml2gnat
2018-01-11 Bob Duff <duff@adacore.com>
gcc/ada/
* doc/gnat_ugn/gnat_utility_programs.rst: Improve documentation of
xml2gnat.
From-SVN: r256509
-rw-r--r-- | gcc/ada/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/ada/doc/gnat_ugn/gnat_utility_programs.rst | 24 |
2 files changed, 24 insertions, 5 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index ce0d63c..77f554e 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,5 +1,10 @@ 2018-01-11 Bob Duff <duff@adacore.com> + * doc/gnat_ugn/gnat_utility_programs.rst: Improve documentation of + xml2gnat. + +2018-01-11 Bob Duff <duff@adacore.com> + * binde.adb (Force_Elab_Order): Give an error if there are duplicate unit names. diff --git a/gcc/ada/doc/gnat_ugn/gnat_utility_programs.rst b/gcc/ada/doc/gnat_ugn/gnat_utility_programs.rst index 74dbe4e..cbef8a0 100644 --- a/gcc/ada/doc/gnat_ugn/gnat_utility_programs.rst +++ b/gcc/ada/doc/gnat_ugn/gnat_utility_programs.rst @@ -1451,11 +1451,25 @@ Alternatively, you may run the script using the following command line: ``gnat2xml`` generates XML files that will validate against :file:`ada-schema.xsd`. - ``xml2gnat`` is a back-translator that translates the XML back - into Ada source code. The Ada generated by ``xml2gnat`` has - identical semantics to the original Ada code passed to - ``gnat2xml``. It is not textually identical, however --- for - example, no attempt is made to preserve the original indentation. + ``xml2gnat`` is a back-translator that translates the XML back into + Ada source code. This is primarily for the purpose of testing + ``gnat2xml``, rather than for users. The Ada generated by ``xml2gnat`` + has identical semantics to the original Ada code passed to + ``gnat2xml``. It is not textually identical, however --- for example, + no attempt is made to preserve the original indentation. + + The ``xml2gnat`` command line contains a list of the same Ada files + passed to gnat2xml (not the names of xml files). The xml files are + assumed to be in an 'xml' subdirectory of the directory in which the + Ada source files are. So for example, if the Ada source file is + some/dir/mumble.adb, then the xml file is found in + some/dir/xml/mumble.adb.xml. You should use the :switch:`--output-dir` + switch of ``gnat2xml`` to tell it to generate the output in the xml + subdirectory, so ``xml2gnat`` can find it. + + Output goes into subdirectories "generated_ada" and "self_rep" of the + output directory, which is the current directory by default, but can + be overridden with --output-dir=dir on the command line. .. _Structure_of_the_XML: |