help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Defining functions on the fly


From: Andreas Röhler
Subject: Re: Defining functions on the fly
Date: Tue, 16 Jun 2015 20:30:51 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.4.0


Am 16.06.2015 um 18:13 schrieb Pascal J. Bourguignon:
Andreas, you might be interested in reading:

https://www.ics.uci.edu/~taylor/ics228/SynGen.pdf

and

     Teitelbaum, T.; T. Reps (September 1981). "The Cornell Program
     Synthesizer: A syntax-directed programming
     environment". Communications of the ACM 24 (9):
     563–573. doi:10.1145/358746.358755.

if you can get your hands on it.

Check also: https://en.wikipedia.org/wiki/Structure_editor

Basically, you could generate the whole mode all the structured editing
commands, from a grammar of the language you want to edit.

And since you could include in the grammar, grammars of other languages
when you have such escape, such as html scripts, or php, etc, you would
get automatically "multi-mode" structured editing modes.


Now, when you generate code (eg. a programming language compiler), it is
perfectly normal to have parts that are generated, and functions and
stubs that are written once for all for all the programs: a run-time
library.

Your code generate would naturally bind mode commands whose name would
be prefixed by the name of the grammar (= the mode), but the run-time
library would be the same for all those generated mode, and would have a
library prefix instead.


Thanks. Will not dig into further here, as it's a vast area - let's go back to the real thing :)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]