Path: csiph.com!feeder.erje.net!2.us.feeder.erje.net!newspeer1.nac.net!border2.nntp.dca1.giganews.com!nntp.giganews.com!news.iecc.com!.POSTED.news.iecc.com!nerds-end From: Hans-Peter Diettrich Newsgroups: comp.compilers Subject: Re: Parsing partial sentences Date: Fri, 28 Apr 2017 02:48:30 +0200 Organization: Compilers Central Lines: 19 Sender: news@iecc.com Approved: comp.compilers@iecc.com Message-ID: <17-04-025@comp.compilers> References: <17-04-001@comp.compilers> <17-04-023@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="66338"; mail-complaints-to="abuse@iecc.com" Keywords: parse Posted-Date: 27 Apr 2017 21:15:31 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:1864 Am 27.04.2017 um 16:58 schrieb Walter Banks: > 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. You missed the "e.g." #defines. In fact everybody seems to have missed it :-( The focus of my question is on *partial* sentences of a language, that are equivalent to a *single* non-terminal of the language. Until now only the *use* of such partial sentences has been discussed, not the *determination* of the resulting non-terminal. DoDi