Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ptp-dev] Reusing Photran parser ?


still working on it

For documentation purpose, I succeeded resolving bindings for an entire project by adding:

        PhotranVPG.getInstance().ensureVPGIsUpToDate( new NullProgressMonitor() );

My last problem is that most things I need to use are in "internal" packages, so I get warnings all over my project :-(

nicolas


On 29/09/2017 09:58, Nicolas Anquetil wrote:

Still working on it and documenting results for future need.

From documentation ('dev-guide-specialized.pdf'), it seems I should use VPG.

Chapter 2 is very informative, but one question remains: how to obtain binding "across files", if a procedure is defined in a file and called in another, how do I get VPG to resolve that binding ? Should it be done manually ?

Any help would be greatly appreciated

nicolas


On 28/09/2017 19:52, Nicolas Anquetil wrote:

Hi,

I need to create a Fortran parser and I thought Photran could be a good base to work from. I already did a similar thing in the past with JDT parser and CDT parser and they proved really useful.

Did anybody try this already ?

Does anybody have a suggestion where to start ?

For example, how should I call the parser on a TransactionUnit to get its AST ? I did find some possibilities, but they all require to use internal classes such as FortranModelBuilder.setTranslationUnit() / FortranModelBuilder.parse()

And for the ASTVisitor ?
I could extend ASTVisitor or implement IASTVisitor, but again both are class/interface of internal packages ...

Any pointer would be welcome

thanks

nicolas



--
Nicolas Anquetil -- MCF (HDR)
Project-Team RMod



Back to the top