Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.compilers > #1844 > unrolled thread
| Started by | mail <mail@slkpg.com> |
|---|---|
| First post | 2017-04-07 14:37 -0800 |
| Last post | 2017-04-07 14:37 -0800 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.compilers
Re: Parsing partial sentences mail <mail@slkpg.com> - 2017-04-07 14:37 -0800
| From | mail <mail@slkpg.com> |
|---|---|
| Date | 2017-04-07 14:37 -0800 |
| Subject | Re: 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
Back to top | Article view | comp.compilers
csiph-web