Results 1 to 14 of 14
  1. #1
    vkolluru is offline Member
    Join Date
    Feb 2010
    Posts
    5
    Rep Power
    0

    Default java compiler source code

    Hello

    Can any one please help me in gettig java compiler's source code.

    thank you

  2. #2
    masijade is offline Senior Member
    Join Date
    Jun 2008
    Posts
    2,571
    Rep Power
    9

    Default

    Why? What it is suppossed to do and what it is suppossed to produce is fully documented. Why do you feel you need to know how one particular implementation (and there are multiple) does it?

  3. #3
    vkolluru is offline Member
    Join Date
    Feb 2010
    Posts
    5
    Rep Power
    0

    Default

    I want to know it as a part of my research work... I need to take the source code and do small modificastions like printing out how many lines the code is and how many instructions etc .... please help me in getting the source code ...

  4. #4
    masijade is offline Senior Member
    Join Date
    Jun 2008
    Posts
    2,571
    Rep Power
    9

    Default

    See the JVM and JLS spec docs.

  5. #5
    vkolluru is offline Member
    Join Date
    Feb 2010
    Posts
    5
    Rep Power
    0

    Default

    Hello,

    I am unable to get the code for the compiler from the links . Can you please help me .

  6. #6
    masijade is offline Senior Member
    Join Date
    Jun 2008
    Posts
    2,571
    Rep Power
    9

    Default

    No one said you would. The one describes the language, the other describes the byte code. Between the two you have everything you need, although it will take quite a lot of reading.

    If you feel that you absolutely must have "teh codez" then Google for OpenJDK which is the "official" open source JDK.

  7. #7
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,535
    Blog Entries
    7
    Rep Power
    20

    Default

    Quote Originally Posted by vkolluru View Post
    I want to know it as a part of my research work... I need to take the source code and do small modificastions like printing out how many lines the code is and how many instructions etc .... please help me in getting the source code ...
    Go to the ANTLR site, get yourself a Java grammar and build your own parser; a parser will be enough for what you have in mind.

    kind regards,

    Jos

  8. #8
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

    Default

    I think all what you need is there in Java Doc. And on your installation folder within a jar package all the source code is there, you can extract them. But I cannot see any point there. I think your implementations not be a modification to the existings. Why don't write your own parser and stuff.

  9. #9
    vkolluru is offline Member
    Join Date
    Feb 2010
    Posts
    5
    Rep Power
    0

    Default

    Hello

    Thank you for your help, I am new to ANTLR and I will try to generate a new parser. Please help me in designing a parser in ANTLR if you have any basic code like that.

  10. #10
    masijade is offline Senior Member
    Join Date
    Jun 2008
    Posts
    2,571
    Rep Power
    9

    Default

    Teh codez!!!!!!!!!!

  11. #11
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default

    Quote Originally Posted by vkolluru View Post
    Hello

    Thank you for your help, I am new to ANTLR and I will try to generate a new parser. Please help me in designing a parser in ANTLR if you have any basic code like that.
    For crying out loud, you don't ask for much, do you? How much are you planning to pay someone here to do your work for you?

  12. #12
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,535
    Blog Entries
    7
    Rep Power
    20

    Default

    Quote Originally Posted by vkolluru View Post
    Hello

    Thank you for your help, I am new to ANTLR and I will try to generate a new parser. Please help me in designing a parser in ANTLR if you have any basic code like that.
    Have you tried to generate a parser, given a grammar for the Java language yet? There is no need to design a parser, i.e. it is generated from the grammar. Try to read the grammar, especially the part that deals with keeping track of line numbers.

    kind regards,

    Jos

  13. #13
    vkolluru is offline Member
    Join Date
    Feb 2010
    Posts
    5
    Rep Power
    0

    Default

    Hello,

    I am literally new to this grammar and parser generation, but anyways I will try reading through online. I will appreciate if you can send me any sample code or grammar.

    Regards.

  14. #14
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,535
    Blog Entries
    7
    Rep Power
    20

    Default

    Quote Originally Posted by vkolluru View Post
    Hello,

    I am literally new to this grammar and parser generation, but anyways I will try reading through online. I will appreciate if you can send me any sample code or grammar.

    Regards.
    Terence Par (the creator of ANTLR) wrote at least one book about ANTLR; it's not a trivial tool and you should read at least one book about it; I think (not sure though) that those books are available online (on their site mayhap). ANTLR can do a lot for you, not reading about its inner working is a waste.

    kind regards,

    Jos

Similar Threads

  1. [SOLVED] Source code of Java API
    By Gudradain in forum New To Java
    Replies: 3
    Last Post: 01-01-2009, 05:17 AM
  2. Online Java compiler code
    By grape028 in forum Advanced Java
    Replies: 1
    Last Post: 12-26-2008, 12:59 PM
  3. Can we Obtain Java Source Code?
    By tornado in forum New To Java
    Replies: 7
    Last Post: 12-10-2008, 07:23 PM
  4. Replies: 1
    Last Post: 11-28-2008, 06:27 PM
  5. open source java code
    By reena in forum Advanced Java
    Replies: 1
    Last Post: 04-19-2008, 06:57 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
  •