Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.compilers    |    Compiler construction, theory, etc. (Mod    |    2,753 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 2,408 of 2,753    |
|    mail to All    |
|    Re: Parsing partial sentences    |
|    07 Apr 17 14:37:58    |
      From: mail@slkpg.com              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              --- SoupGate-Win32 v1.05        * Origin: you cannot sedate... all the things you hate (1:229/2)    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca