Path: utzoo!censor!geac!torsqnt!jarvis.csri.toronto.edu!cs.utexas.edu!samsung!zaphod.mps.ohio-state.edu!wuarchive!decwrl!crltrx!decvax!ima!esegue!compilers-sender From: dhw@itivax.iti.org (David H. West) Newsgroups: comp.compilers Subject: Re: Compiler with adjustable parsers Keywords: parse,prolog Message-ID: <1990Mar3.062533.26248@esegue.segue.boston.ma.us> Date: 3 Mar 90 06:25:33 GMT References: <1990Mar1.143905.14553@esegue.segue.boston.ma.us> Sender: compilers-sender@esegue.segue.boston.ma.us Reply-To: dhw@itivax.iti.org (David H. West) Organization: Industrial Technology Institute Lines: 18 Approved: compilers@esegue.segue.boston.ma.us In article <1990Mar1.143905.14553@esegue.segue.boston.ma.us> hackeron@ATHENA.MIT.EDU writes: >Does anyone know of a compiler/language that allows you to specify changes >to how the language is parsed (in part at least) from withing the program. Edinburgh-derived Prologs have a precedence grammar that can be changed at runtime (though not all implementations let you change everything); the interesting part of it is that you can change operators between prefix, infix and postfix, and the system will, if you wish, respect the new conventions on output also. This makes reading and writing (certains kinds of) unusually-formatted stuff almost painless. I once threw together a tiny natural-language-like interface in a great hurry by this means. (Emphasis on TINY). Some functional languages of UK origin have similar facilities. -- Send compilers articles to compilers@esegue.segue.boston.ma.us {spdcc | ima | lotus}!esegue. Meta-mail to compilers-request@esegue. Please send responses to the author of the message, not the poster.