home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!spool.mu.edu!agate!foucault.berkeley.edu!jbuck
- From: jbuck@foucault.berkeley.edu (Joe Buck)
- Newsgroups: comp.lang.c++
- Subject: Re: template disappointments ... (suggestions?)
- Date: 29 Dec 1992 23:36:06 GMT
- Organization: U. C. Berkeley
- Lines: 21
- Distribution: world
- Message-ID: <1hqnd6INNe83@agate.berkeley.edu>
- References: <DSCHIEB.92Dec29133556@muse.cv.nrao.edu> <24508@alice.att.com>
- NNTP-Posting-Host: foucault.berkeley.edu
-
- In article <24508@alice.att.com> ark@alice.UUCP () writes:
- >In article <DSCHIEB.92Dec29133556@muse.cv.nrao.edu> dschieb@muse.cv.nrao.edu (Darrell Schiebel) writes:
- >> list<vector<int>> list_vec_int;
- >
- >Huh?? This works fine -- just remember to put a space between the
- >two > characters so the >> won't be taken for a shift-right symbol.
-
- This is such a common error (and is so ugly) that compiler writers
- would be well advised to add productions to their grammar that catch
- it, or magic that splits the >> token into two tokens in this case
- if that fits in with the compiler's structure.
-
- Yes, I know that the rules of lexical analysis force the >> to be one
- token, but list<vector<int>> is a perfectly natural way of writing
- this thing, so perhaps it should be permitted even at the cost of
- adding an ugly rule to the grammar.
-
-
-
- --
- Joe Buck jbuck@ohm.berkeley.edu
-