semantic-analyze-current-context for fortran functions and subroutine
"Martin Stein" <[email protected]> Thu, 5 Feb 2015 14:24:47 +0100
| Newsgroups | gmane.emacs.cedet |
|---|---|
| Message-ID | <trinity-bb7ca930-dd26-4d15-8fee-21a066519736-1423142687696@3capp-gmx-bs10> |
Hi, I am slowly fighting my way through context analysis, and it is starting to work (completion with type matching etc.). There is one thing I have no idea of resolving without overloading semantic-analyze-current-context and even defining new context classes semantic-analyze-context-subroutine. A subroutine can be viewed as a C-function with return type void. However, in contrast to C usage of function and subroutines is more restricted. If you want to call a subroutine, you have to write: call subname(...) A function is not allowed in this context. The return value of a function must always be used in some way and cannot be discarded. So writing myfun(arg) for any function myfun in C is not possible in fortran neither with functions nor subroutines. As far as I can see I would need a new context to capture the call at the start of the line? Moreover, in order to allow function or subroutine tags at the beginning of the line as in myfun(arg) above, I will need yet another context, the general context allows no restrictions as far as I can see. Any ideas and suggestions on how to resolve this problem? (If this cannot be easily resolved, it might be a good idea to refactor this big semantic-analyze-current-context-default routine, as most stuff is still useful to me.) Martin ------------------------------------------------------------------------------ Dive into the World of Parallel Programming. The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/