Re: Parsing partial sentences

mail <mail@slkpg.com>
Fri, 07 Apr 2017 14:37:58 -0800

          From comp.compilers

Related articles
Parsing partial sentences DrDiettrich1@netscape.net (Hans-Peter Diettrich) (2017-04-03)
Re: Parsing partial sentences pronesto@gmail.com (Fernando) (2017-04-04)
Re: Parsing partial sentences DrDiettrich1@netscape.net (Hans-Peter Diettrich) (2017-04-07)
Re: Parsing partial sentences gneuner2@comcast.net (George Neuner) (2017-04-07)
Re: Parsing partial sentences mail@slkpg.com (mail) (2017-04-07)
Re: Parsing partial sentences DrDiettrich1@netscape.net (Hans-Peter Diettrich) (2017-04-07)
Re: Parsing partial sentences gneuner2@comcast.net (George Neuner) (2017-04-10)
Re: Parsing partial sentences DrDiettrich1@netscape.net (Hans-Peter Diettrich) (2017-04-11)
Re: Parsing partial sentences martin@gkc.org.uk (Martin Ward) (2017-04-11)
Re: Parsing partial sentences DrDiettrich1@netscape.net (Hans-Peter Diettrich) (2017-04-11)
Re: Parsing partial sentences martin@gkc.org.uk (Martin Ward) (2017-04-11)
[10 later articles]
| List of all articles for this month |
From: mail <mail@slkpg.com>
Newsgroups: comp.compilers
Date: Fri, 07 Apr 2017 14:37:58 -0800
Organization: Compilers Central
Injection-Info: miucha.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="30654"; mail-complaints-to="abuse@iecc.com"
Keywords: C, parse
Posted-Date: 10 Apr 2017 10:25:56 EDT

I think the short answer is "no there is not an easy way to handle C
#defines," it is fairly hard. Easiest is to get an open source
preprocessor and use it to convert the C file to preprocessed C. Then use
your converter on that.


I have one that kind of almost works posted on my site that you can look
at to see one stab at the problem from a formal parsing approach. I think
most real preprocessors are less parsers and more just a program. They do
need to be able to parse the C constant expression grammar though.


The SLK Parser Generator: http://www.slkpg.com


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.