{"action":"created","issue":{"url":"https://api.github.com/repos/cmacmackin/ford/issues/27","labels_url":"https://api.github.com/repos/cmacmackin/ford/issues/27/labels{/name}","comments_url":"https://api.github.com/repos/cmacmackin/ford/issues/27/comments","events_url":"https://api.github.com/repos/cmacmackin/ford/issues/27/events","html_url":"https://github.com/cmacmackin/ford/issues/27","id":57277603,"number":27,"title":"Support for other variable types","user":{"login":"acroucher","id":1060785,"avatar_url":"https://avatars.githubusercontent.com/u/1060785?v=3","gravatar_id":"","url":"https://api.github.com/users/acroucher","html_url":"https://github.com/acroucher","followers_url":"https://api.github.com/users/acroucher/followers","following_url":"https://api.github.com/users/acroucher/following{/other_user}","gists_url":"https://api.github.com/users/acroucher/gists{/gist_id}","starred_url":"https://api.github.com/users/acroucher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/acroucher/subscriptions","organizations_url":"https://api.github.com/users/acroucher/orgs","repos_url":"https://api.github.com/users/acroucher/repos","events_url":"https://api.github.com/users/acroucher/events{/privacy}","received_events_url":"https://api.github.com/users/acroucher/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-02-11T05:15:34Z","updated_at":"2015-02-11T05:49:56Z","closed_at":null,"body":"I've run into a problem when using FORD to document code that uses a library which introduces other variable types, and these are not recognised by FORD.\r\n\r\nSpecifically I'm using the [PETSc](http://www.mcs.anl.gov/petsc/) library, which is written in C, but provides interfaces so you can use it from Fortran. In your code you put in preprocessor `#include` statements to get access to the variable types and routines you need (for parallel vectors, matrices, linear and nonlinear solvers, etc.) When you declare variables of these new types, you don't use e.g. `type(Vec) :: v`, you just declare `Vec :: v`. Which is why FORD doesn't pick them up. Instead it either ignores them, or sometimes comes up with an \"Invalid variable declaration\" error.\r\n\r\nIt looks like FORD has a couple of regexps in **sourceform.py** that detect variable types: `VAR_TYPE_RE`, and `VARIABLE_RE` (the latter in the `FortranContainer` class). These appear to hard-code the variable types that are recognised.\r\n\r\nDo you think it would be possible to add an option in the project file so that users could declare additional variable types they are using? These could then be added to those regexps in sourceform.py.\r\n\r\nI realise you are busy just now, Chris, but wondered if you thought this idea has any merit, in which case I could perhaps look at working on it myself."},"comment":{"url":"https://api.github.com/repos/cmacmackin/ford/issues/comments/73837059","html_url":"https://github.com/cmacmackin/ford/issues/27#issuecomment-73837059","issue_url":"https://api.github.com/repos/cmacmackin/ford/issues/27","id":73837059,"user":{"login":"szaghi","id":1661942,"avatar_url":"https://avatars.githubusercontent.com/u/1661942?v=3","gravatar_id":"","url":"https://api.github.com/users/szaghi","html_url":"https://github.com/szaghi","followers_url":"https://api.github.com/users/szaghi/followers","following_url":"https://api.github.com/users/szaghi/following{/other_user}","gists_url":"https://api.github.com/users/szaghi/gists{/gist_id}","starred_url":"https://api.github.com/users/szaghi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/szaghi/subscriptions","organizations_url":"https://api.github.com/users/szaghi/orgs","repos_url":"https://api.github.com/users/szaghi/repos","events_url":"https://api.github.com/users/szaghi/events{/privacy}","received_events_url":"https://api.github.com/users/szaghi/received_events","type":"User","site_admin":false},"created_at":"2015-02-11T05:49:56Z","updated_at":"2015-02-11T05:49:56Z","body":"I agree with acroucher, this can be helpful for fortran-c mixing programs. However, one of the characteristic of Ford that I love is its KISS nature: it is designed for fortran, for fortran poor man. I think this is the reason why Ford is presently better than doxygen. I am afraid that try to supporting also C Ford will become a poor brother of doxygen... I think that the suggestion of acroucher is the best way for improve Ford without losing its KISSness: let the user to define additional regexs. But I prefer that Ford hard-core remains compliant with the Fortran standard.\r\n\r\nThis is only my modest opinion, my best regards,\r\nStefano"}}