Need help tokenizing this C++ snippet...

dweller@news.imagin.net (David Weller)
22 May 1997 22:38:42 -0400

          From comp.compilers

Related articles
Need help tokenizing this C++ snippet... dweller@news.imagin.net (1997-05-22)
| List of all articles for this month |
From: dweller@news.imagin.net (David Weller)
Newsgroups: comp.compilers
Date: 22 May 1997 22:38:42 -0400
Organization: ImagiNet Communications Ltd, Arlington, Texas
Keywords: C++, parse

I'm doing a little research work and attempting to understand the
correct tokenization of the following code snippet:


template<class Item, class OtherItem>
    ParamClass<Item, OtherItem>&
            ParamClass<Item, OtherItem>::
operator=(const ParamClass<Item, OtherItem>& c)
{}


I'm using the grammar specified in CD2. I'm getting hung up on
references, I thought they were a ptr-operator token, but all
referrals I see to it indicates it's a prefix token. To me, the
second line looks like ptr-operator is a postfix token...I seem to
recall, however, that there were similar distinctions with ANSI C
(like the declaration: int * a, b;).


I suppose, to accelerate my laziness (?), I should just ask if anybody
has a tokenizer available (no, it's not a homework assignment...) so
that I can get a feel for what the "correct" breakdown is.
--


Post a followup to this message

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