Compiler in Java

Paulo Pinto <paulo.pinto@intervento.com>
15 Feb 2000 16:21:23 -0500

          From comp.compilers

Related articles
Compiler in Java paulo.pinto@intervento.com (Paulo Pinto) (2000-02-15)
| List of all articles for this month |

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

    Hi,


    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 :


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


  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


    http://students.fct.unl.pt/users/pjmlp/en/author.html


    http://students.fct.unl.pt/users/pjmlp/files/l98/l98.tgz
    http://students.fct.unl.pt/users/pjmlp/files/l98/l98.zip


  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, pjmlp@students.si.fct.unl.pt |
| http://students.fct.unl.pt/users/pjmlp |


Post a followup to this message

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