[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference turris::languages

Title:Languages
Notice:Speaking In Tongues
Moderator:TLE::TOKLAS::FELDMAN
Created:Sat Jan 25 1986
Last Modified:Thu May 22 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:394
Total number of notes:2683

182.0. "q. general macro expand language ?" by RDGCSS::MURRAY () Fri Apr 29 1988 07:43

    What I'm after is a general macro language.
    
    Under rt-11 you could run the macro assembler as 2 runs. The first
    run just expanded the macros, i.e. did pure text processing. You
    could input anything at all to this process (XPND) (for instance,
    and trivially, a name and address file).
    
    	.macro format name add1 add2 ...
    		formatting instructions
    	.endm                                   a able
    	                                         x....
    	format a able x y z      --->            y....
    	format b baker x y z                     z....
    	end
                                                    .
                                                    .
                                           
    Anyone know of anything like this available on a) vax, b) others
    including msdos m/cs (and no! I'm not doing a name and address file)
    
    						jim
T.RTitleUserPersonal
Name
DateLines
182.1SCAN; awk,m4,lex/yaccSMURF::REEVESJon Reeves, ULTRIX compiler groupFri Apr 29 1988 14:0010
    Under VMS, SCAN is probably the most general purpose macro language.
    One convenient overview is issue 6 (the latest) of the DTJ, pp.
    40-50.
    
    Under UNIX and its derivatives (like ULTRIX), depending on the precise
    application, there are a number of tools: awk, m4, lex/yacc.
    
    I'm not familiar with the MS-DOS market; someone else will have
    to cover that.  I'd expect to find clones of the UNIX utilities
    available, at least.
182.2TOKLAS::FELDMANPDS, our next successFri Apr 29 1988 15:1613
    SCAN, awk, lex, and yacc aren't really macro languages.  Scan and
    awk are pattern matching languages.  Lex builds table driven lexical
    analyzers, while yacc builds table driven parsers.  They're all
    close, so they might be useful for the requirements of .0.  In
    particular, it should be easy to implement a macro processor by
    using SCAN as the lexical analyzer.
    
    My memory of m4 is very hazy, but I believe it is what I would call
    a macro language.  That is, it recognizes a specific syntax of macro
    calls in otherwise arbitrary source files, and expands them according
    to user macro definitions.
    
       Gary
182.3PASTIS::MONAHANhumanity is a trojan horseMon May 02 1988 10:012
    	8BAL is a general macro processor, available through Decus. It is
    15 years since I used it, though.
182.4STPPANIC::SHORTPeter Short, P&C Unit, LondonWed May 04 1988 10:475
    If you look in Software Tools In Pascal, (Kernighan & Plauger -
    I know I've spelt their names wrong!) you will find a chapter on
    writing a macro processor, this would give you a basis for writing
    a general purpose utility that you could port to VMS, Ultrix or
    MSDos...
182.5Try DECUS...HALLEY::MUNROEMore Flash for the Ca$hFri May 06 1988 06:4110
    For sure you can get ML1 from DECUS (and probably somewhere on the
    ENET).  Also available from DECUS is the macro language discussed
    by Waite in his book on Non-numerical programming and methods (old
    book, but some neat concepts).  This may in fact be the same language,
    my memory is failing me.
    
    Dick Munroe
    
    p.s. If you DO manage to come up with a copy of the code for Waite's
    macro processor, I'd love a copy!
182.6Now that was a fun language!MOIRA::FAIMANOntology Recapitulates PhilologyFri May 06 1988 20:198
    Wow, Waite's macro language.  I haven't used that for 10 years!
    (Long ago when I worked at Burroughs, I implemented it and used it
    to add an extract machine layer on top of an unspeakably primitive
    microprocessor assembler language that we were using. I still
    remember typing in the entire WIMP definition of the macro processor
    from the listings in the back of the book!
    
    	-Neil 
182.7ml1 mli trac mint emacs tecoRDGCSS::MURRAYThu Jul 07 1988 08:2818
    I haven't found any ref. to ML1 but have found a ref. to ML/I which
    apparently is by Brown(67). *But* this led me on to a ref. about TRAC
    (65). The built-in functions of TRAC have the syntax
    
    #(function,arg,arg...) 
    
    which is vitually identical to the syntax of MINT which is the base
    languge of my PC based EMACS which I've played around with but never
    really got to grips with since I discovered the first version was
    *just* some TECO macros (silly me).
    
    Unfortunately VAX Emacs appears to have LISP as its implementation
    language (unfortunate because sometimes I like trying out ideas
    at home first then maybe do them on the VAX).
    
    So at the moment I'm toying with the idea of extending the PC TECO
    I've got up to more like VMS TECO and starting from scratch to build
    up some general macros - hey ho.
182.8TRAC; Mock LispTLE::AMARTINAlan H. MartinSun Jul 10 1988 23:0111
Re .7:

TRAC looks familiar, but I can't recall where I saw it.  Creative Computing?
Gries' Compiler Construction for Digital Computers?

VMS Emacs started out being written in C, but has gradually been converted over
to Bliss.  While its customization language is Mock Lisp, I think its set of
wired-in procedures is more comprehensive than, say, ITS EMACS.  Thus, you are
more likely to be executing Bliss code than Mock Lisp code for any specific
keybinding.
				/AHM
182.9Bingo!!!VOGON::MURRAYFri Mar 03 1989 16:1834
    Onwards - ever onwards - anyway as I was saying before I was so
    rudely interrupted by my contract having run out again for the
    umpteenth time over the last 10 yrs.
    
    Chasing up .-n I decided again to apply macros to my now current
    project.
    
    I got ML1 from the toolshed but unfortunately it wasn't inclined
    to run - a bit out of date I think
    
    So I tried toolshed macro which worked fine until it ran out of
    steam on a pushback stack - I was just defining things too deeply.
    BUT as an example in the kit was what appeared to be the source
    code written in some strange thing halfway between c and fortran.
    - turned out to be ratfor which I hadnt ever seen before.( In passing
    the file extension was .W - Is this related to the reference to
    WIMP mentioned by Neil Faiman?)
    
    Back to the toolshed for ratfor and with a bit of twiddling it
    translated and with a bit more twiddling the fortran compiled but
    link? - no !! it needs another library - well - it *was* only an
    example.
    
    but then yesterday I twigged that the ML1 chap lived not 100 yds
    from where I'm currently working AND he had a working copy AND he
    had a manual ( dated about 1815 but still kosher )
    
    So now I've got my SCAN code translated into ML1 and everything
    in the garden's rosy and for a while anyway I rest a happy person.
    
    Jim