Re: parsing c++ without a symbol table!

David L Moore <dlmoore@pgroup.com>
27 Jul 1998 23:18:52 -0400

          From comp.compilers

Related articles
parsing c++ without a symbol table! gregory.knapen@bell.ca (KNAPEN, GREGORY) (1998-07-27)
Re: parsing c++ without a symbol table! dlmoore@pgroup.com (David L Moore) (1998-07-27)
Re: parsing c++ without a symbol table! qjackson@wave.home.com (Quinn Tyler Jackson) (1998-07-28)
Re: parsing c++ without a symbol table! jason@cygnus.com (Jason Merrill) (1998-07-28)
Re: parsing c++ without a symbol table! mac@coos.dartmouth.edu (1998-07-30)
| List of all articles for this month |
From: David L Moore <dlmoore@pgroup.com>
Newsgroups: comp.compilers
Date: 27 Jul 1998 23:18:52 -0400
Organization: A poorly-installed InterNetNews site
References: 98-07-199
Keywords: C++, parse

> For example, a c-style type cast is usually recognized by checking if
> the identifier between parenthesis is a type or not. It is possible to
> find a type cast by the syntax alone.
>
> var = (Type1)(Type2)...(TypeN)(expression);
>
> an expression between () is a type cast if and only if it is followed by
> another typecast or an expression.


Actually, this is not correct. The following small program is a
counter-example.


int f(int i)
        {
        return i+1;
        }


int main()
        {
        return (f)(2);
        }
--


Post a followup to this message

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