Re: Re: Why put type information into syntax?

Keith Thompson <kst@cts.com>
3 Apr 2000 11:26:35 -0400

          From comp.compilers

Related articles
Why put type information into syntax? across@vega.co.uk (Allister Cross) (2000-03-25)
Re: Why put type information into syntax? lex@cc.gatech.edu (2000-03-28)
Re: Re: Why put type information into syntax? srineet@email.com (Srineet) (2000-04-01)
Re: Re: Why put type information into syntax? kst@cts.com (Keith Thompson) (2000-04-03)
| List of all articles for this month |
From: Keith Thompson <kst@cts.com>
Newsgroups: comp.compilers
Date: 3 Apr 2000 11:26:35 -0400
Organization: CTS Network Services
References: 00-03-133 00-03-148 00-04-007
Keywords: types

"Srineet" <srineet@email.com> writes:
> I think there is another reason for built in types. Some language
> features rely on them, for example, in C the expression in an
> if-statement / while-statement etc. must be coercable to int. Now, if
> there was no built-in int type, what rule can you have for that? This
> is even more relevant for languages with a builtin boolean type, where
> the if-condition-expression must be boolean. So we see that some
> builtin types not only make the gammar "easy to specify" but are in
> fact necessary.


This merely means that such types have to be predefined. It doesn't
imply that their names have to be reserved words or otherwise
distinguished in the syntax, which was what the original question was
about.


--
Keith Thompson (The_Other_Keith) kst@cts.com <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://www.sdsc.edu/~kst>


Post a followup to this message

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