Compiler in Java

Paulo Pinto <>
15 Feb 2000 16:21:23 -0500

          From comp.compilers

Related articles
Compiler in Java (Paulo Pinto) (2000-02-15)
| List of all articles for this month |

From: Paulo Pinto <>
Newsgroups: comp.compilers
Date: 15 Feb 2000 16:21:23 -0500
Organization: Compilers Central
Keywords: Java, available


    Back in 1998 when I was still at the university I and a friend of
mine developed a compiler for the compilers class.
    It compiles a imperative language that has a syntax similar to ML, for
example :

        fun square (val x: int):int = return x * x
    printint (square (x))

  The code generated are bytecodes, that can be coverted into x86 code
by using some NASM macros that were developed by our theacher.
  The compiler itself was developed in Java (jdk 1.1.6) with JavaCC for
lexer and scanner.

  Unfortunaly for most of you the comments and error messages are in
Portuguese. I am a quit short on time so only if there is enough
demand I will translate them. But I did had time to create a document
in English that explains the language and the bytecodes used.

  If anyone wishes to view it, it is available at

  In two versions (zip and tgz), please note that some browsers corrupt
the tgz version. The site where the compiler is available is rather
old, but I will update as soon as possible.

| Paulo Pinto, |
| |

Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.