Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.compilers > #1844 > unrolled thread

Re: Parsing partial sentences

Started bymail <mail@slkpg.com>
First post2017-04-07 14:37 -0800
Last post2017-04-07 14:37 -0800
Articles 1 — 1 participant

Back to article view | Back to comp.compilers


Contents

  Re: Parsing partial sentences mail <mail@slkpg.com> - 2017-04-07 14:37 -0800

#1844 — Re: Parsing partial sentences

Frommail <mail@slkpg.com>
Date2017-04-07 14:37 -0800
SubjectRe: Parsing partial sentences
Message-ID<17-04-005@comp.compilers>
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

[toc] | [standalone]


Back to top | Article view | comp.compilers


csiph-web