Path: csiph.com!goblin3!goblin.stu.neva.ru!news.misty.com!news.iecc.com!.POSTED.news.iecc.com!nerds-end From: Walter Banks Newsgroups: comp.compilers Subject: Re: Parsing partial sentences Date: Thu, 27 Apr 2017 10:58:41 -0400 Organization: Aioe.org NNTP Server Lines: 14 Sender: news@iecc.com Approved: comp.compilers@iecc.com Message-ID: <17-04-023@comp.compilers> References: <17-04-001@comp.compilers> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: miucha.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="23298"; mail-complaints-to="abuse@iecc.com" Keywords: parse Posted-Date: 27 Apr 2017 14:32:26 EDT X-submission-address: compilers@iecc.com X-moderator-address: compilers-request@iecc.com X-FAQ-and-archives: http://compilers.iecc.com Xref: csiph.com comp.compilers:1862 On 2017-04-03 3:57 AM, Hans-Peter Diettrich wrote: > Is there an easy way to parse e.g. C #defines into constants, > functions or other non-terminals, which are not the goal of the > entire grammar? In a word NO. #defines are always strings even when they look like constants, something I have found out the hard way. There have only been two ways that I have successfully dealt with #defines: a preprocessor pass or later and much faster pipeline the processing of C source and add the defined definition processing into part of the source fetch handling. w..