Scala: One language to rule them all (I)

Scalera

In the beginning, there were not programming languages, just machine code. Automatic programming came to save all us by casting power rings to rule the machines: Programming languages. They diversified, inspired new ones, constituted a rich ecosystem. Among them appeared a highly useful kind of computer languages: DSLs.

DSLs

Domain Specific (computer) Languages have been around for quite a long time. The academic description of this kind of languages states that they are centred and used for an specific application domain. DSLs are small and concise which implies that they guide their users in the process of describing actions, entities or relations within their domain of application. What’s more important, they are made to fit their purpose.

If I am doing statistics research, why should worry about memory management?!!

It isn’t surprising that a whole kingdom of these mini-languages has evolved and took over machine learning tools, scientific programming, hardware…

View original post 1,028 more words

Advertisements

How to write grammar for your own language with ANTLR .? (Part -I) : Setting up the Environment( Intellij with ANTLR)

Knoldus

Ever wondered about this question that actually how can we write our own language?

How the grammer of clojure or scala can be written.?

Here is the answer , we can write grammar for our own language using ANTLR. This is a powerful tool for generating Lexer, Parser and  Visitors for the grammar written by our self.

So in this blog we will discuss how to configure ANTLR with our Intellij for getting started to write our own language.

So these are the steps for adding plugins to your Intellij Idea so that you can work with ANTLR and generate your own lexers, parser and visitors:

  1. Download plugin from here. So that your intellij idea may recognize .g4 file.
  2. Add this plugin to your intellij using the Plugins option in your settings.
  3. Now is the time for adding a plugin for generating the lexer and parser. This is a great plugin…

View original post 242 more words