comp.lang.ada
 help / color / mirror / Atom feed
From: Stephen Leake <stephen_leake@stephe-leake.org>
Subject: Re: Literate Programming
Date: Mon, 07 Sep 2009 04:38:31 -0400
Date: 2009-09-07T04:38:31-04:00	[thread overview]
Message-ID: <uzl979mk8.fsf@stephe-leake.org> (raw)
In-Reply-To: c166611a-9d39-4ade-8a74-9eede9c29d54@37g2000yqm.googlegroups.com

"Hibou57 (Yannick Duchêne)" <yannick_duchene@yahoo.fr> 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



  reply	other threads:[~2009-09-07  8:38 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-06  3:08 Literate Programming Hibou57 (Yannick Duchêne)
2009-09-07  8:38 ` Stephen Leake [this message]
2009-09-08  3:51   ` Yannick Duchêne Hibou57
2009-09-08  7:09     ` Jean-Pierre Rosen
2009-09-08 10:06       ` AdaMagica
2009-09-09  9:47         ` Jean-Pierre Rosen
2009-09-08 11:04       ` Yannick Duchêne Hibou57
2009-09-08 12:14         ` Martin
2009-09-08 16:30           ` Yannick Duchêne Hibou57
2009-09-08 16:51             ` Martin
2009-09-09  8:00     ` Stephen Leake
replies disabled

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