Whitespace (Was: Q: Definition of a scripting lang.)

eifrig@beanworld.cs.jhu.edu (Jonathan Eifrig)
Sun, 16 Apr 1995 19:54:50 GMT

          From comp.compilers

Related articles
Re: Q: Definition of a scripting lang. lwall@netlabs.com (1995-03-27)
Re: Q: Definition of a scripting lang. rpereda@wotangate.sc.ti.com (1995-04-05)
Whitespace (Was: Q: Definition of a scripting lang.) eifrig@beanworld.cs.jhu.edu (1995-04-16)
Re: Whitespace (Was: Q: Definition of a scripting lang.) ludemann@netcom.com (1995-04-28)
| List of all articles for this month |

Newsgroups: comp.compilers
From: eifrig@beanworld.cs.jhu.edu (Jonathan Eifrig)
Keywords: design
Organization: The Johns Hopkins University CS Department
References: 95-04-013 95-04-056
Date: Sun, 16 Apr 1995 19:54:50 GMT

Ramon Pereda, <rpereda@wotangate.sc.ti.com> wrote:
>Jonathan Eifrig <eifrig@beanworld.cs.jhu.edu> wrote:
>: : Personally, I view a language as a "scripting" language if (1) whitespace
>: : is significant...
>:
>: Whitespace is significant in nearly all modern languages. You can't
>: put whitespace inside a token in C, Ada, Modula, Lisp, Perl, etc. And
>: you typically *must* put whitespace between two adjacent alphanumeric
>: tokens in any of these languages.


Perhaps I should have been more clear: what I meant was that in
most scripting languages, sequences of "whitespace" characters
(which normally include SPACE, TAB, and NEWLINE) are not equivalent.
Which means, or course, that such "whitespace" isn't really "white" at
all, since there is semantic meaning attached to the various forms of
"whitespace" in the program, other than the usual use of tokenization.


C doesn't escape such cruftiness either, unfortunately: "\<NEWLINE>"
is not the same as "\<SPACE><NEWLINE>", and the fact that preprocessor
directives must start in column 1 means that the newline character isn't
really "white" at all. An unfortunate legacy of the preprocessor.


=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Jack Eifrig (eifrig@cs.jhu.edu) The Johns Hopkins University, C.S. Dept.
--


Post a followup to this message

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