Re: Why context-free?

glen herrmannsfeldt <>
9 Oct 2005 20:46:12 -0400

          From comp.compilers

Related articles
Why context-free? (2005-10-06)
Re: Why context-free? (Chris F Clark) (2005-10-07)
Re: Why context-free? (2005-10-07)
Re: Why context-free? (Russ Cox) (2005-10-07)
Re: Why context-free? (Robert A Duff) (2005-10-07)
Re: Why context-free? (2005-10-08)
Re: Why context-free? (2005-10-08)
Re: Why context-free? (glen herrmannsfeldt) (2005-10-09)
Re: Why context-free? (2005-10-09)
Re: Why context-free? (2005-10-09)
Re: Why context-free? (Robert Figura) (2005-10-10)
Re: Why context-free? (Ivan Boldyrev) (2005-10-10)
Re: Why context-free? (Tony Finch) (2005-10-13)
Re: Why context-free? (2005-10-13)
[25 later articles]
| List of all articles for this month |

From: glen herrmannsfeldt <>
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:
  > [
> 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.