PEG-Based Language Workbench Yuriy Korenkov, Ivan Loginov, Arthur Lazdin Saint Petersburg National Research University of Information Technologies, Mechanics and Optics Saint Petersburg, Russia { ged.yuko, ivan.p.loginov }@gmail.com, lazdin@yandex.ru AbstractIn this article we present a new tool for language-oriented programming which provides to user convenient means to describe the domain specific languages in the form of language based on parsing expression grammars and helpful tools for grammar debugging. Also we consider the sample of using this toolkit as a part of an integrated development environment. I. INTRODUCTION Computers are widely used in different areas therefore mass creation of corresponding software for them represents a very important problem. For example economic problems are characterized by a large amount of calculations and data that is used, including presence of complex logical structures, use of various input and output result tables such as applications, statements, reports, etc. Manual programming of such tasks potentially is a very slow process associated with a large number of bugs that can be detected only during the debugging and testing process. Automatic programming which purpose is a generation of a program using computers themselves can eliminate these difficulties. To make this possible we need a formal language that can be used to describe the solution of the problem in terms of a particular domain. Such languages are called Domain Specific Languages (DSL) [1]. There are many examples where such languages are used in a variety of areas. Some of them are directly related to software development while others are very specific. As an example of such language the Perl language [2] can be mentioned. It was designed for work with texts, allowing extraction of information from them and generation of reports that are based on this information. To perform these tasks Perl needs implementation of mechanisms that can do processing of text file contents in a convenient way. One of such mechanisms is the support of regular expressions. A good example of a domain specific language is SQL. This language was designed specifically to work with relational databases. Additionally, some languages that were created for data manipulation are based on SQL. For example LINQ (Language Integrated Query) [3], the built- in C# for querying collections of data. Also there is a large number of languages that are specialized for different areas of business and production. For example languages for hardware description (VHDL, Verilog), languages for symbolic computations (Mathematica, Maple, Maxima, etc.). At present many domain specific languages are created for many different subject areas. On the other hand continuous attempts to develop a new solution for language-oriented programming indicate that further work in this area is needed. Such work includes improving usability (convenience) of the created DSL by integration with existing development environments or creation of a new tool. Such tool can be oriented on the specific tasks (within project for concrete DSL) or can represent general solution (like MPS [4]). In this article convenience is understood as presence of program features such as syntax highlighting, auto-completion of a text, etc. II. STATE OF ART Quite a lot of tools for language-oriented programming have been created already: various template engines, visual editors of data models and processes, markup tools, integrated with the program code, and so on. Two categories of existing solutions can be distinguished: 1) Highly specialized in the private subject area of a specific project. Usually they represent an implementation of the most nowhere used DSL. 2) Tools with opportunities for language-oriented programming [5], whereby new DSL can be created. Highly specialized solutions are implemented through prototyping tool (in this case they inherit appropriate opportunities) or created "from scratch". Some of latest existing solutions can be categorized as language workbench. This definition describes a new set of tools that are used for creation of domain specific languages. Such tools allow to define the abstract syntax that can be used to acquire corresponding language. This language will be then accessible in the integrated development environment (IDE). Language workbench can be defined as one of language-oriented programming means. _______________________________________________________PROCEEDING OF THE 17TH CONFERENCE OF FRUCT ASSOCIATION ISSN 2305-7254