Path: csiph.com!xmission!news.snarked.org!news.linkpendium.com!news.linkpendium.com!news.iecc.com!.POSTED.news.iecc.com!nerds-end From: Fernando Newsgroups: comp.compilers Subject: Re: Parsing partial sentences Date: Tue, 4 Apr 2017 06:05:22 -0700 (PDT) Organization: Compilers Central Lines: 19 Sender: news@iecc.com Approved: comp.compilers@iecc.com Message-ID: <17-04-002@comp.compilers> References: <17-04-001@comp.compilers> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injection-Info: miucha.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="39414"; mail-complaints-to="abuse@iecc.com" Keywords: parse, tools Posted-Date: 04 Apr 2017 10:02:21 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:1841 Em segunda-feira, 3 de abril de 2017 12:16:18 UTC-3, Hans-Peter Diettrich escreveu: > 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? Hi Hans, I am not sure I understood the question, but from the title of the e-mail, I am assuming that you want to parse C code partially available? If that's so, then we have a parser that handles that. It is open-source, and we have a web interface that you can try: http://cuda.dcc.ufmg.br/psyche-c/. It resolves ambiguities due to missing declarations, and infer the types that are missing in the program. In the end, we produce enough code that lets you compile your program. Regards, Fernando