|
Boost Users : |
From: Andy Little (andy_at_[hidden])
Date: 2006-03-07 09:58:49
"Leon Mergen" <leon_at_[hidden]> wrote in message
news:440D5189.4080205_at_antrophia.com...
> Andy Little wrote:
>
>>>Has anyone created a c++ parser with boost::spirit?
>>>
>>>
>>
>>I dont know if anyone has (though I believe Hartmut Kaiser created a C parser)
>>but AFAIK the problem with C++ parsers in general is that they dont tell the
>>whole story, because in C++ there is a huge amount of context specific
>>information.
>>
>
> Isn't this the problem with /all/ parsers, and in general, it is an AST
> treewalker that actually determines the context ?
>
> As in, if you would want context, you would parse, build and AST, and
> then walk over the AST to determine the context... just as with any
> language ?
I guess so, except high altitude mountain climbing over the AST using copious
supplies of oxygen might be nearer the mark than walking. As I understand it C++
is not beloved by compiler writers for this reason! I guess it all comes down to
the exact definition of "a C++ parser"and what you want to do with its output.
regards
Andy Little
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net