Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!news.ripco.com!news.glorb.com!news-out.readnews.com!news-xxxfer.readnews.com!news.misty.com!news.iecc.com!nerds-end From: "Harold Aptroot" Newsgroups: comp.compilers Subject: Parsing C#-like generics Date: Mon, 11 Jul 2011 20:22:34 +0200 Organization: A noiseless patient Spider Lines: 24 Sender: news@iecc.com Approved: comp.compilers@iecc.com Message-ID: <11-07-019@comp.compilers> NNTP-Posting-Host: news.iecc.com X-Trace: gal.iecc.com 1310468666 52054 64.57.183.58 (12 Jul 2011 11:04:26 GMT) X-Complaints-To: abuse@iecc.com NNTP-Posting-Date: Tue, 12 Jul 2011 11:04:26 +0000 (UTC) Keywords: parse, question Posted-Date: 12 Jul 2011 07:04:26 EDT X-submission-address: compilers@iecc.com X-moderator-address: compilers-request@iecc.com X-FAQ-and-archives: http://compilers.iecc.com Xref: x330-a1.tempe.blueboxinc.net comp.compilers:195 Hi, I'm having some trouble parsing generics when mixed with comparisons. The way I try to do it, there is an ambiguity between LessThan and a "list of types between angle brackets". For example, x(x and a single argument which is the expression x ) I know it is actually inherently ambiguous, because t(t3) could mean two things: - LessThan(t, BiggerThan(t2, t3) - invoke t with argument t3 In that case I want to pick option two. For tt3 I want to pick option one, not report "missing ( " Can this be done with an LALR parser at all? If so, how? harold