looking for interpreter / macro language facility 
Author Message
 looking for interpreter / macro language facility

hi.  i am looking for advice and/or suggestions on an interpreter or
macro language facility which i plan on adding to my application.  are
there common languages which are used to add macro facilities to
applications?  are there any PD/commercial lisp implementations
available which would suffice?

        within this macro language, i need to at least to
        a) be able to call functions within my program.
        b) be able to use control and loop constructs.
        c) define and use simple variables.

my program will be written in C/C++ to be run in a UNIX workstation
environment.  in the worst case i can develop my own language using
lex / yacc but why reinvent the wheel.

thanks.




Sun, 07 Nov 1993 23:30:52 GMT  
 looking for interpreter / macro language facility

Quote:
>hi.  i am looking for advice and/or suggestions on an interpreter or
>macro language facility which i plan on adding to my application.  

REXX would be a good choice.  Check comp.lang.rexx to find out if
there is a REXX interpreter for the environments you are interested
in.  I think it's available on IBM mainframes, UNIX, most micros, etc.
It's an algol/basic/Pascal-class language with lots more flexibility,
and any command that isn't understood by the interpreter gets
passed to whatever program started the macro.  Thus, you could
write a REXX command called "downparagraph" which said

downparagraph:
   getline X
   while X ~= "" do
     downline
     getline X
     end

(It's been a while, so the syntax may be wrong.)  Anyway,
the getline and downline statements are not REXX statements,
so they get bounced back to the calling editor to handle.

Anyway, it's a good idea to check it out, especially since
it handles multiple concurrent appplications at once:

getfiles:
   getline X
   address command "ftp " || X
   getline X
   while X ~= "" do
      address "FTP-REXX-PORT" "get " || X
      getline X
      end
   address "FTP-REXX-PORT" "bye"

which would get the name of the machine from the current
line in the editor, start up FTP, and then get the files
named on the succeeding lines.   It's also a very easy language
to learn and works with lots of other products, which is
a plus compared to learning a new macro language for every
application.

              -- Darren

--
--- Darren New --- Grad Student --- CIS --- Univ. of Delaware ---
----- Network Protocols, Graphics, Programming Languages, FDTs -----
+=+ Nails work better than screws, when both are driven with hammers +=+



Mon, 08 Nov 1993 01:28:09 GMT  
 looking for interpreter / macro language facility

Quote:
>hi.  i am looking for advice and/or suggestions on an interpreter or
>macro language facility which i plan on adding to my application.  are
>there common languages which are used to add macro facilities to
>applications?  are there any PD/commercial lisp implementations
>available which would suffice?
>    within this macro language, i need to at least to
>    a) be able to call functions within my program.
>    b) be able to use control and loop constructs.
>    c) define and use simple variables.

You might want to have a look at tcl by Karl Lehenbauer. It was posted
to alt.sources last December. It does everything you want, is rather
small (10-20k extra code for the interpreter, if I remember correctly)
and looks like a mixture of sh and lisp.

I have played around a little with it when it was posted, but I have
not really used it, so I can't say how usable it is for real work, but
the docu says it has already been used for an X-based editor.
If it is not archived somewhere near you, you can get it by anonymous
FTP from ftp.vmars.tuwien.ac.at.

--
|    _  | Peter J. Holzer                       | Think of it   |
| |_|_) | Technical University Vienna           | as evolution  |
| | |   | Dept. for Real-Time Systems           | in action!    |



Mon, 08 Nov 1993 22:52:59 GMT  
 looking for interpreter / macro language facility


Quote:
>hi.  i am looking for advice and/or suggestions on an interpreter or
>macro language facility which i plan on adding to my application.  are
>there common languages which are used to add macro facilities to
>applications?

You might want to check out tcl, the Tool Command Language, by Prof.
John Ousterhout at UC Berkeley.  I have used it on several projects
now and am immensely pleased with the results.

It is distributed as part of the Tk release.  Here is the release
announcement for Tk 1.0:
------------------------------------------
This is to announce the first official release of the Tk toolkit
for X11.  Tk is philosophically similar to Xt, but it is based
around the Tcl language.  The use of Tcl simplifies the toolkit
and also provides a great deal of additional power:  many
applications can be written as Tcl scripts without writing any C
code at all, and Tcl provides a means for different applications
to communicate with each other.  A paper describing Tk appeared
in the Winter '91 USENIX Conference Proceedings, and is also
distributed as part of the release.

The release contains source code and documentation for the
following things:
    (1) The Tk toolkit.
    (2) The Tcl command language.
    (3) A Motif-like widget set.
    (4) A simple windowing shell called "wish".
    (5) A few demo scripts for wish.
All of the Tk and Tcl stuff is public and free.  As far as I'm
concerned, you can do anything you want with it.  If you build
applications based on Tk I'd be interested to hear what they are
and how Tk helped or hindered your application(s).  If you decide
Tk is a piece of junk, I'd be interested to hear your reasons.

Overall, I'd rate this release as about beta-level in quality:  I
hope that the code is pretty stable, but I expect to get a lot of
feedback about missing or undesirable features.  There's a complete
set of manual entries but no tutorial-style introduction yet.  I hope
that you won't have too much trouble getting started with Tk if you've
had previous experience programming X11.

Some of you may have discovered various pre-release versions of
Tcl over the last few months.  The new release supercedes the
pre-release versions and contains a number of bug fixes plus a few
additional features such as the "wm" command for dealing with window
managers.

The release is available for public FTP from sprite.berkeley.edu
(Internet address 128.32.150.27).  To retrieve the release, use
anonymous FTP to sprite (user "anonymous", password "guest") and
retrieve the file "tk.tar.Z" with the following set of commands:
                type image (try "type binary" if this command is rejected)
                get tk.tar.Z
What you'll get is a compressed tar file;  to get back the original
directory hierarchy, type the commands
                uncompress tk.tar.Z
                tar xf tk.tar
This will create a tk subdirectory with all the source files and
documentation.  There will be a README file in the subdirectory that
tells how to compile Tk and gives some hints about how to get started
with Tk.

If you can't get access to the release via the Internet, send me e-mail
and I'll try to find some other way to get the release to you (e.g.
1/2" tape or Exabyte-style 8mm videocassette).

I've also set up a mailing list for people interested in exchanging
e-mail about Tcl and Tk.  If you're interested in joining the list,
let me know.
------------------------------------------------
To subscribe to the mailing list, send a request to

--


(214)518-5050           | present.  Please forward mail through the
                        | above address.  Sorry for the inconvenience.



Mon, 08 Nov 1993 23:19:14 GMT  
 looking for interpreter / macro language facility

Quote:
>hi.  i am looking for advice and/or suggestions on an interpreter or
>macro language facility which i plan on adding to my application.  are
>there common languages which are used to add macro facilities to
>applications?  are there any PD/commercial lisp implementations
>available which would suffice?

You can get a number of Scheme interpreters written in C.  They range
from small ("scm") to huge (MIT Scheme).  What machines are you runing
on?

==========

You might look at "scm" initially, which is fairly minimal in size and
requires the least knowledge to hack. It has been widely ported (Mac,
PC, Suns, etc.).

        ftp altdorf.ai.mit.edu (anonymous)
        cd archive/scm

For Sun3/4 (and Vaxen?), "ELK" is pretty nice:

        Elk 1.2 is available on uunet.uu.net and I believe
        on gatekeeper.dec.com.  You can also try to connect
        to the `archie' server on say quiche.cs.mcgill.ca
        and search for "elk".

If you are going for 68K machines (Sun3, Next, Mac), you might take a
look at the "Gambit" compiler.  It has an interpreter and is linkable
with C binaries.:

        You can get a copy of Gambit (release 1.5) via
        anonymous ftp from the machine acorn.cs.brandeis.edu
        (address 129.64.3.8).  It is in the /dist directory
        and is compressed (about 400K).




Tue, 09 Nov 1993 03:54:21 GMT  
 looking for interpreter / macro language facility

REXX is a very good choice of languages for string manipulation and
command construction... looping and handling condition codes are
also very well done.  REXX is available from many vendors for VMS,
DOS, and unix.

gary a hoffman
RISC Systems, Watson Research



Tue, 09 Nov 1993 02:59:00 GMT  
 looking for interpreter / macro language facility

:hi.  i am looking for advice and/or suggestions on an interpreter or
:macro language facility which i plan on adding to my application.  are

Try looking into tcl, the Tools Command Language by John Ousterhout

are thinking of.  A paper on it was presented at the Winter 1990
Usenix conference; it is also widely available for anon ftp (sorry,
I'm not on the Internet so I don't recall where it can be had, but
the usual 'archie' service can tell you that).  At present there are
two slightly diverging branches of the tcl family: Tcl 4.something,
enhanced by 'hackercorp' (Peter da Silva, and others) with many
modular extensions such as associative arrays and regular expressions;
and Tcl 5.something, without those enhancements but integrated with
Tk into a rich X Window System-ready environment.  From the needs
you express, I believe you'd be most interested in Tcl 4.

Other possibilities are Rexx, a nice language chosen for a similar
purpose in IBM's SAA and also dominating this field for Amiga boxes,
but I don't think you can get it for free; and others I have just
heard mentioned, such as Python.  The 'others' cathegory includes
lots of Lisps and Schemes, but I guess you could get more details
on those in comp.lang.{lisp.scheme}.
--
Alex Martelli - CAD.LAB s.p.a., v. Stalingrado 53, Bologna, Italia

Phone: (work:) ++39 (51) 371099, (home:) ++39 (51) 250434;
Fax: ++39 (51) 366964 (work only), Fidonet: 332/407.314 (home only).



Tue, 09 Nov 1993 16:20:09 GMT  
 looking for interpreter / macro language facility

Quote:
>hi.  i am looking for advice and/or suggestions on an interpreter or
>macro language facility which i plan on adding to my application. [...]
>    within this macro language, i need to at least to
>    a) be able to call functions within my program.
>    b) be able to use control and loop constructs.
>    c) define and use simple variables.
>my program will be written in C/C++ to be run in a UNIX workstation
>environment. [...]

This was one of the purposes why I developed Python.  Python is an
interpreted programming language with high-level data types (strings,
lists, associative arrays; everything unlimited in size and garbage
collected) and provides all the features you request.  It is also
object-oriented.  Its syntax is intended to be as clear as possible,
to allow a quick start for casual users.

Python is normally used as a stand-alone interpreter, but hooks are
provided to add python as an extension language to existing
C applications.  I have no experience with hooking it up to C++
applications yet.  I do know that Python is written quite portably.

Python is freely available.  It is still under development; I hope to
distribute a new version this summer.  If you try to do unusual things
with it, I am eager to hear about your experiences, and willing to
help hacking the code (or to point out where to start hacking).

See the attached availability sheet.


"The life of a Repo Man is always intense"

Availability of Python and STDWIN
=================================

Python and STDWIN were posted to alt.sources around february 1991.
They should be available from sites that archive this newsgroup, such
as wuarchive.wustl.edu.  I also post patches to this group.
(I will post the entire source to comp.sources.misc when I think the
products are a little bit more finished.)

Python and STDWIN are available from a number of ftp sites.
The * in file names is the version number, e.g., 0.9.5 (the last digit
is the patch level).

Current version numbers are 0.9.1 for Python and 0.9.5 for STDWIN.

Site            hp4nl.nluug.nl (IP address 192.16.202.2)
For whom        users in the Netherlands and the rest of Europe
Note            the same archive is also accessible via mcsun.eu.net
Directory       pub/windows
        File    stdwin*.tar.Z
Directory       pub/programming/languages
        Files   python*.tar.Z
                pythondoc[12].ps.Z
Directory       pub/comp/mac/compiler
        File    Python.hqx

Site            wuarchive.wustl.edu (IP address 128.252.135.4)
For whom        users in North America
Directory       usenet/alt.sources
Note            Raw alt.sources archive, see README there.  Grep -i the
                Index file for "stdwin" or "python".

Site            gatekeeper.dec.com (IP address 16.1.0.2)
For whom        users in North America
Directory       pub/misc
        File    stdwin*.tar.Z
Directory       pub/misc/python
        Files   python*.tar.Z
                pythondoc[12].ps.Z
                Python.hqx.Z



Sat, 13 Nov 1993 22:32:23 GMT  
 looking for interpreter / macro language facility

Quote:

>REXX is a very good choice of languages for string manipulation and
>command construction... looping and handling condition codes are
>also very well done.  REXX is available from many vendors for VMS,
>DOS, and unix.

You forgot one important one! The Amiga implementation: AREXX. This is
one of the most successful implementations of REXX, almost all new
programs on the Amiga supports AREXX, can any other machine make that
claim? The very magnitude of the AREXX success on the Amiga *may* have
helped to convince other manufactures to consider REXX for their machines.

I would say that even IBM has underestimated the potential of REXX, the
Amiga community has discovered it...

   /Clas

--
-------------------------------------------------------------------------

-------------------------------------------------------------------------



Fri, 12 Nov 1993 19:41:24 GMT  
 looking for interpreter / macro language facility

Quote:
>hi.  i am looking for advice and/or suggestions on an interpreter or
>macro language facility which i plan on adding to my application.

Here are some selections/suggestions of extension languages you can freely
(depending on your meaning of the term) use, reuse (by ripping it out of
its original application), hack, imitate, munge, adapt and do whatever
else necessary to make your application stand-out, and gain instant fame. ;-)

In no particular order [and from memory, sorry about omissions]:

        o Ousterhout's TCL. This is a well thought-out simple, embeddable
          command language with one data type: strings. It seems to
          interface and work well.

        o Guido's PYTHON looks very interesting, and also seems to be
          developed for extension or standalone uses. It comes with the
          appropriate hooks for interfacing.

        o GnuEmacs Elisp. If you can rip this out of its original
          application, it may actually be useful elsewhere.

        o Xlisp (earlier versions PD). Instead of breaking your nails
          trying to rip-out elisp, you may use this one instead. AutoCad uses it,
          and so does Winterp. You can study the latter to learn more
          about using xlisp as an extension language.

        o gwm (generic window manager) and crisp (a brief clone) has
          lisp-ish (read: lotsa parens) extension languages, the former is
          called wool, and looks better thought-out than the latter. Both
          will take some ripping effort.

        o There are Scheme interpreters you can use for extension purposes.
          ELK is a well-known one specially designed for the task, but
          there are other interpreters around as well, so you have a
          choice.  The positive thing about using scheme is that this is
          not just another (yawn) extension language.. It is a very nice
          language with simple syntax and powerful semantics, has been
          around since mid-seventies, It has several excellent books on
          it, has an IEEE standard, and you can be sure it won't take 300
          pages to explain.

        o There are C (subset) interpreters. Why not? You may choose to
          use a language that most people actually know something about,
          for a change.  Two of these were published in DrDobb's journal,
          another one in the appendix of "Software Engineering in C", and
          yet another one is part of UPS, an X-oriented debugging program
          that is freely distributed.

        o Betz publised another simple object-oriented extension language in
          Byte, DEC. 1988 (I think). Look for a Byte source archive for that
          month. It is a byte-code-compiler/vm combination that looks easy
          to extend and modify, and may be useful for your needs.

        o There is zsh, Rayan's zmailer extension language that is actually
          an implementation of sh with list processing and database access
          enhancements. Actually, you probably could pick some of the
          simpler, more comprehensible shells floating about, and adapt as
          an extension language. The recently posted "rc" (plan-9 shell)
          clone, for example, or a version of pd ksh could be useful.

        o Well, there is always the well-loved awk, (free versions being
          mawk or gawk) which may be somewhat easier to adapt as an
          extension language than its larger distant-relative with warts.

        o Long time ago, an ealier version of ICON was adapted as an
          extension language for Gosling's Emacs. I don't know if one can
          still perform this trick. ICON has grown somewhat.

        o If you are an old-timer, there are at least two versions of TECO
          in C I know of. :-)

        o You can always get more radical, and use Little Smalltalk (budd)
          as an extension language. Objects, classes, inheritence, methods,
          all the good things are there. Another possibility is to use one
          of the free postscript interpreters (such as Crispin Goswell's)
          for this purpose. I know at least one person who wanted to use
          it as an extension language for his editor, and we all know of a
          small computer company that uses it as a basis for an extensible
          windowing system. ;-)

        o Get Samuel Kamin's "Programming languages: An Interpreter-Based
          Approach". There are small interpreters in that book for APL, CLU,
          SASL, LISP, SCHEME, SMALLTALK and PROLOG, and all with lisp-ish
          syntax. It is not too hard to adapt one of those as an extension
          language. [the book is excellent. Get it anyway.]

        o You can always use one of two (that I know of) LOGO implementations
          as an extension language, and claim that even a child can program
          your application. ;-). Actually, logo is a much better language than
          most of those crufty extension (?) languages some hackers come up with,
          but it usually takes a small kid to figure that out.

I can probably list another dozen or more in a good day. There are counless
interpreters our there for various known or better-not-known languages you
can pick up and use for extending your application.

Quote:
> are
>there common languages which are used to add macro facilities to
>applications?

Why, who would ever gain anything if there was anything common about macro
or extension languages? But I would say syntax-less (lisp-ish) languages
are probably more popular, and the most common thing about them is the
Cambridge Polish notation, plus some commonplace control syntax. I think
Scheme is the best choice amongst them, but I am biased. ;-)

Quote:
>in the worst case i can develop my own language using
>lex / yacc but why reinvent the wheel.

Yes, indeed. I wish more people could take the time to ask that very
question. [sigh]

Quote:
>thanks.

No problem.

oz
---

only gets in the way. -- Alan J. Perlis  |  Uucp: utai/utzoo!yunexus!oz



Tue, 16 Nov 1993 11:40:44 GMT  
 looking for interpreter / macro language facility
|
|REXX is a very good choice of languages for string manipulation and
|command construction... looping and handling condition codes are
|also very well done.  REXX is available from many vendors for VMS,
|DOS, and unix.

        AREXX is an excellent implementation of
        REXX, which is provided as an integral part
        of AmigaDos 2.0. It runs on most versions
        of Commodore Amiga computers.

        It is used as a high-level interprocess
        communication tool as well as for other
        purposes...

--
  ,u,    Bruce Becker   Toronto, Ontario

 `\o\-e  UUCP: ...!utai!mnetor!becker!bdb
 _< /_       <--- net.gumby having a vowel movement



Tue, 16 Nov 1993 01:19:19 GMT  
 looking for interpreter / macro language facility
Does anyone know if there is a PD REXX interpreter available?  Many thanks in
advance.

        Andy Vida-Szucs



Tue, 23 Nov 1993 03:04:43 GMT  
 
 [ 15 post ] 

 Relevant Pages 

1. looking for interpreter / macro language facility

2. Python interpreter as a macro language

3. *** Looking for Excel macro language documentor.

4. Dylan macro facility (or lack of it)

5. Dylan macro facility (or lack of it)

6. Dylan Macro Facility

7. Low-level macro facility

8. Scheme macro facility

9. Why no macro facility?

10. Looking for facility scheduling program in CW

11. looking for a free sound recording facility

12. language interpreters/ interpreted languages weaknesses?

 

 
Powered by phpBB® Forum Software