Proceedings of ISP RAS

FRIS Language Service for Extended Fortran Support in Microsoft Visual Studio

I.S. Ratkevich (RFNC – VNIIEF, Sarov)


This report deals with the construction of the language service for extended support of the Fortran programming language in the integrated development environment (IDE) Microsoft Visual Studio. The model and general approach for language service construction is offered.
The proposed general model of a language service consists of five key blocks: the IDE integration block; the analysis block; the recognized elements storage block; the elements serialization/deserialization block; the elements view model block.
The IDE integration block connects a language service with a basic IDE infrastructure. It’s responsible for subscription of Language Service for text editing events and for providing corresponding responses.
The Analysis block is responsible for accomplishing lexical, syntactic and semantic analysis. It gathers all needed information about the elements of a programming language and puts it into the recognized elements storage block. The second task of this block is to provide information for syntax highlighting of edited text.
The Recognized elements storage block is like a database of all elements needed for the Language Service operation. In general case, it is kind of a symbol table. The storage block could be filled from two sources: from analysis block, as a result of analysis of a source files, and from elements serialization/deserialization block, as a result of deserialization from a previously existing specialized program description in the case of using model of API (Application Programming Interface) for arbitrary programming libraries.
The elements serialization/deserialization block performs two functions. Firstly, it allows saving the content of programming projects as XML files for description of API and documentation comments. Secondary, it allows restoring the content of programming projects from their XML models.
The Elements view model block is a link, a kind of adaptor for elements of storage block to their representation needed by IDE integration block. Thus, recognized elements may contain some information that is not necessary to IntelliSense technology features, or on the contrary, does not contain some needed information. The elements view model is playing this interconnection role. It contains data types that are wrappers for elements of storage block, which fulfils requirements of the IDE integration block. There is also implemented various functions of filtering and selecting of different kinds necessary information.
The proof of operability of proposed general model of a language service is given on the example of the FRIS language service developed by author. The material could be equally applied for construction language services both for other programming languages and for other development environments.


FRIS; Fortran Intelligent Solutions; Fortran; Visual Studio Extensibility; Language Service; Visual Studio


Proceedings of the Institute for System Programming, vol. 27, issue 3, 2015, pp. 9-28

ISSN 2220-6426 (Online), ISSN 2079-8156 (Print).

DOI: 10.15514/ISPRAS-2015-27(3)-1

Full text of the paper in pdf Back to the contents of the volume