HR & Training +91-769-609-5145

Home » Uncategorized » Build your own languages with JavaCC

Build your own languages with JavaCC

Programming languages are often divided, somewhat artificially, into compiled and interpreted languages, although the boundaries have become blurred. As such, don’t worry about it. The concepts discussed here apply equally well to compiled as well as interpreted languages. We will use the word compiler below, but for the scope of this article, that shall include the meaning of interpreter.

Compilers have to perform three major tasks when presented with a program text (source code):

  1. Lexical analysis
  2. Syntactic analysis
  3. Code generation or execution

The bulk of the compiler’s work centers around steps 1 and 2, which involve understanding the program source code and ensuring its syntactical correctness. We call that process parsing, which is the parser’s responsibility.

Leave a Reply

Your email address will not be published. Required fields are marked *