From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,48610c7d031e8a3c X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,UTF8 Path: g2news2.google.com!news1.google.com!npeer03.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!post02.iad.highwinds-media.com!news.flashnewsgroups.com-b7.4zTQh5tI3A!not-for-mail Newsgroups: comp.lang.ada Subject: Re: Literate Programming References: From: Stephen Leake Date: Mon, 07 Sep 2009 04:38:31 -0400 Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (windows-nt) Cancel-Lock: sha1:N2hERDoEPOJGha2zFXiYIjbAJPU= MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Complaints-To: abuse@flashnewsgroups.com Organization: FlashNewsgroups.com X-Trace: 800144aa4c632e197caa722000 Xref: g2news2.google.com comp.lang.ada:8202 Date: 2009-09-07T04:38:31-04:00 List-Id: "Hibou57 (Yannick Duchêne)" writes: > But there is also another way of doing things which I like very much > and even more for a long : this is named “ Literate Programming ” As I understand it, that can be considered a meta-language, that mixes LaTeX and Ada source in one file, and provides tools to split them out into files that the relevant compilers will accept. > So I was wondering if someone has ever heard about some extentions to > GPS which would give it literate programming facilities. What, exactly, is missing from GPS? You have the ability to run external tools, to do the splitting. I guess syntax colorization is confused; it needs to know when to apply LaTeX, when to apply Ada. You can't preserve the navigation facilities, treating the literate file as the source; pragma Source_Reference only changes the file name, not the line numbers. That's a GNAT limitation; you could petition them for a more powerful Source_Reference pragma (but you'd probably have to come up with some money to get it). I prefer using separate LaTeX and Ada files, and referencing one from the other appropriately. That preserves all the navigation facilities in both languages. If you include the relative file name in a comment, Emacs can easily navigate between the files; I don't know if GPS will do that. As you say, one of the prime features of literate programming is providing structure for unstructured languages. Ada doesn't need that :). I don't know for sure, but I bet there's an Emacs mode for literate programming :). I know there is support in general for "multiple modes in a single buffer", for JavaScript embedded in html. -- -- Stephe