Path: csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!feed.news.qwest.net!mpls-nntp-02.inet.qwest.net!216.196.98.143.MISMATCH!border4.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!news.iecc.com!nerds-end From: glen herrmannsfeldt Newsgroups: comp.compilers Subject: Re: LRSTAR 3.0: LALR(k) parser generator & lexer generator for C++ Date: Sun, 12 Feb 2012 06:29:16 +0000 (UTC) Organization: Aioe.org NNTP Server Lines: 17 Sender: johnl@iecc.com Approved: comp.compilers@iecc.com Message-ID: <12-02-014@comp.compilers> References: <12-02-004@comp.compilers> <12-02-006@comp.compilers> <12-02-009@comp.compilers> <12-02-013@comp.compilers> NNTP-Posting-Host: news.iecc.com X-Trace: leila.iecc.com 1329028315 70488 64.57.183.58 (12 Feb 2012 06:31:55 GMT) X-Complaints-To: abuse@iecc.com NNTP-Posting-Date: Sun, 12 Feb 2012 06:31:55 +0000 (UTC) Keywords: parse, C++, debug Posted-Date: 12 Feb 2012 01:31:55 EST 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:454 Steven G. Kargl wrote: > In file included from actions.cpp:4, > from dfac.cpp:2: > global.h:52:15: error: "or" cannot be used as a macro name as > it is an operator in C++ In C, the preprocessor is logically before the compiler, so, as far as I understand, there is no problem using any C reserved word as a macro name, as long as you don't need the word. I know C++ isn't C, but this one surprises me. Still, if you aren't using the "or" operator, a quick pass through sed should be able to fix it. -- glen