Results 1 to 3 of 3
  1. #1
    Jeremy is offline Member
    Join Date
    Jul 2008
    Posts
    28
    Rep Power
    0

    Default Guidance in writing a compiler

    Hey everybody,

    I'm currently writing a small compiler for an assignment. I'm at a point where I'm not sure how to continue. But first, let me share where I am.

    The compiler is for Mini Java (BNF) and I am using ANTLR to help me out. (And of course, their website has been down all week.) I've written a working grammar and have created an AST from that grammar.

    Next, I need to do semantic analysis. I'm stuck on how to go about doing this. Does ANTLR have built in mechanisms to help me with this? My ultimate goal is to generate bytecode for which I can run on the JVM.

    Any pointers would be appreciated.

    //Jeremy

  2. #2
    serjant's Avatar
    serjant is offline Senior Member
    Join Date
    Jun 2008
    Location
    Ukraine,Zaporozhye
    Posts
    487
    Rep Power
    7

    Default

    You can use antlr plugin for eclipse and build your project in eclipse:
    ANTLR plugin for Eclipse

  3. #3
    Jeremy is offline Member
    Join Date
    Jul 2008
    Posts
    28
    Rep Power
    0

    Default

    Thanks. I've been using ANTLRWorks and that has been helpful.

Similar Threads

  1. compiler,JIT compiler & interpreter
    By gamilah in forum New To Java
    Replies: 4
    Last Post: 11-04-2008, 12:32 AM
  2. Compiler
    By pawankumarom in forum New To Java
    Replies: 3
    Last Post: 09-08-2008, 01:11 PM
  3. Guidance
    By gizdev in forum New To Java
    Replies: 5
    Last Post: 09-07-2008, 07:14 PM
  4. Compiler?
    By robin105 in forum New To Java
    Replies: 2
    Last Post: 07-26-2008, 02:46 AM
  5. compiler
    By jidd in forum New To Java
    Replies: 3
    Last Post: 01-29-2008, 12:40 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •