Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] Question about parser

Current implementation of parser does not provide complete model. For example, parser processes statements and resolves/collects references, reports about syntax problems. But it does not collect information about statements, there are no corresponding AST classes, and requester interface doesn't have callback methods for statements processing, aren't there?. I realize well that this functionality is not required for the tasks that use parser service now. Working on code formatter implementation I tried where it was possible to subclass parser classes in order to get desired behavior. So far it did not required essential efforts. In this case I could also follow the same way. Before doing that, I just was wandering about plans of parser development. I found out in new ast2 branch packages named "dom" (now empty). If we should expect to see this stuff soon, it would be a wast of time to torture existing parser in order to compel it to do the things it cannot do now. On the other hand, if this is not a correct assumption, doing this work probably makes sense because using ineffective code formatting engine even if this one later will be redesigned using new parser services, can help to design and test engine-independent UI (not a small, BTW) and to approve formatting technology in general.


Back to the top