Re: Why context-free?

glen herrmannsfeldt <gah@ugcs.caltech.edu>
9 Oct 2005 20:46:12 -0400

          From comp.compilers

Related articles
Why context-free? nmm1@cus.cam.ac.uk (2005-10-06)
Re: Why context-free? cfc@shell01.TheWorld.com (Chris F Clark) (2005-10-07)
Re: Why context-free? torbenm@app-4.diku.dk (2005-10-07)
Re: Why context-free? rsc@swtch.com (Russ Cox) (2005-10-07)
Re: Why context-free? bobduff@shell01.TheWorld.com (Robert A Duff) (2005-10-07)
Re: Why context-free? nmm1@cus.cam.ac.uk (2005-10-08)
Re: Why context-free? vidyut.vidyut@gmail.com (2005-10-08)
Re: Why context-free? gah@ugcs.caltech.edu (glen herrmannsfeldt) (2005-10-09)
Re: Why context-free? mpah@thegreen.co.uk (2005-10-09)
Re: Why context-free? nmm1@cus.cam.ac.uk (2005-10-09)
Re: Why context-free? rfigura@erbse.azagtoth.de (Robert Figura) (2005-10-10)
Re: Why context-free? boldyrev@cgitftp.uiggm.nsc.ru (Ivan Boldyrev) (2005-10-10)
Re: Why context-free? dot@dotat.at (Tony Finch) (2005-10-13)
Re: Why context-free? nmm1@cus.cam.ac.uk (2005-10-13)
[25 later articles]
| List of all articles for this month |

From: glen herrmannsfeldt <gah@ugcs.caltech.edu>
Newsgroups: comp.compilers
Date: 9 Oct 2005 20:46:12 -0400
Organization: Compilers Central
References: 05-10-053 05-10-061 05-10-062
Keywords: parse, design, comment
Posted-Date: 09 Oct 2005 20:46:12 EDT

John wrote:
  > [
(snip)
> diagnostics and general readability. When you start building types
> into the syntax, that means that many type errors now are likely to
> produce "syntax error" rather than "string found where boolean
> expected", and I have to say your 2 vs. 3 way branch is grosser than
> anything I've done in perl. As far as extending the syntax on the
> fly, that avenue was extensively investigated in the 1970s in
> languages like IMP-72 and EL/1, all of which died.


Two languages that I have used recently that allow syntax changes, TeX
and mathematica, don't seem to be going away so fast.


There are some very strange errors that you can get in both languages.


TeX even allows changes to the character codes defining which characters
are letters and which aren't, so that the tokenizing can change.
Changes must be done carefully so that future text isn't expanded until
the change has taken effect.


-- glen
[You're right, but all the TeX users I know use the pre-written macros
in LaTeX and avoid doing any syntax magic of their own. -John]


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.