locked
how to make my OWN COMPILER? RRS feed

  • Question

  • hi all,

    i need a little help. i'm writing an yealy essay (project) and i have to do one thing :)

    My project is from graph theory in mathematics, and if you want you may look through a little screnshot:
    http://elibreum.com/xlam/ulgraph.jpg

    So, i need to write my own compiler to do algorithms. I mean that user can write modules or plug-ins for my program on language i wrote. And than connect that modules to my program and visualize it;

    The main question: Is here anybody who knows how to do that?

    i was looking for the books called "theory of translation and grammar of the language" and "compilers", but i have found not much.

    Will you be able to help me? tell something to search, or recommend any books. ... or tutorials :D
    Friday, April 24, 2009 7:04 PM

Answers

  • if you want to use c# or vb as language for your compiler,then you have to use csharpcodeprovider or vbcodeprovider class, try these links below for more information.
    http://msdn.microsoft.com/en-us/library/microsoft.csharp.csharpcodeprovider.aspx
    http://www.codeproject.com/KB/dotnet/dynacodgen.aspx

    But if you want to develop your own language or script, then you have a lot of works to do, you have to know regular expression and others. check this site http://www.softpanorama.org/Algorithms/compilers.shtml

    Textbooks that you can read

    Compiler Design - Introduction To The Theory Of Computation
    Programming Language Pragmatics
    Benjamin Pierce - Types and Programming Languages
    COMPILERS AND COMPILER GENERATORS And an introduction with C++ BY P.D .TERRY  
    ADVANCED PROGRAMMING LANGUAGE  DESIGN BY RAPHAEL FINKEL
    Aho - Compilers - Principles, Techniques, and Tools 2e.pdf
    Algorithms For Compiler Design.chm
    ALGORITHMS FOR COMPILER DESIGN.pdf
    Compiler Construction.pdf
    CRC.Press.The.Compiler.Design.Handbook.2nd.Edition.Dec.2007.pdf
    Engineering a Compiler.pdf
    LET BUILD COMPILER.doc
    Modern Compiler Implementation in Java. Second Edition.pdf
    Modern_compiler_design.djvu
    Friedman - Essentials of Programming Languages 3e (MIT, 2008).pdf
    Design Concepts in Programming Language.pdf
    Foundations Of Object Oriented Languages.pdf
    Object-Oriented Programming Languages - Interpretation .pdf
    Logics of Specification Languages.pdf
    Power PC Compiler Writer's Guide.pdf

    kaymaf


    I hope this helps, if that is what you want, just mark it as answer so that we can move on
    • Edited by kaymaf Friday, April 24, 2009 7:31 PM typo
    • Marked as answer by yourTony Saturday, April 25, 2009 11:06 AM
    • Unmarked as answer by yourTony Saturday, April 25, 2009 4:38 PM
    • Marked as answer by yourTony Saturday, April 25, 2009 4:40 PM
    Friday, April 24, 2009 7:30 PM

All replies

  • if you want to use c# or vb as language for your compiler,then you have to use csharpcodeprovider or vbcodeprovider class, try these links below for more information.
    http://msdn.microsoft.com/en-us/library/microsoft.csharp.csharpcodeprovider.aspx
    http://www.codeproject.com/KB/dotnet/dynacodgen.aspx

    But if you want to develop your own language or script, then you have a lot of works to do, you have to know regular expression and others. check this site http://www.softpanorama.org/Algorithms/compilers.shtml

    Textbooks that you can read

    Compiler Design - Introduction To The Theory Of Computation
    Programming Language Pragmatics
    Benjamin Pierce - Types and Programming Languages
    COMPILERS AND COMPILER GENERATORS And an introduction with C++ BY P.D .TERRY  
    ADVANCED PROGRAMMING LANGUAGE  DESIGN BY RAPHAEL FINKEL
    Aho - Compilers - Principles, Techniques, and Tools 2e.pdf
    Algorithms For Compiler Design.chm
    ALGORITHMS FOR COMPILER DESIGN.pdf
    Compiler Construction.pdf
    CRC.Press.The.Compiler.Design.Handbook.2nd.Edition.Dec.2007.pdf
    Engineering a Compiler.pdf
    LET BUILD COMPILER.doc
    Modern Compiler Implementation in Java. Second Edition.pdf
    Modern_compiler_design.djvu
    Friedman - Essentials of Programming Languages 3e (MIT, 2008).pdf
    Design Concepts in Programming Language.pdf
    Foundations Of Object Oriented Languages.pdf
    Object-Oriented Programming Languages - Interpretation .pdf
    Logics of Specification Languages.pdf
    Power PC Compiler Writer's Guide.pdf

    kaymaf


    I hope this helps, if that is what you want, just mark it as answer so that we can move on
    • Edited by kaymaf Friday, April 24, 2009 7:31 PM typo
    • Marked as answer by yourTony Saturday, April 25, 2009 11:06 AM
    • Unmarked as answer by yourTony Saturday, April 25, 2009 4:38 PM
    • Marked as answer by yourTony Saturday, April 25, 2009 4:40 PM
    Friday, April 24, 2009 7:30 PM
  • What about adding "Interpreter" to your search?  Seeing that you wrote your own "language" a compiler sounds a bit formiddable, but it begins with an Interpreter. 

    http://www.google.com/search?q=computer+language+interpreter&rls=com.microsoft:en-us:IE-SearchBox&ie=UTF-8&oe=UTF-8&sourceid=ie7&rlz=1I7SUNA


    Mark the best replies as answers. "Fooling computers since 1971."
    Friday, April 24, 2009 7:30 PM
  • kaymaf, it's like you have all these books, isn't it?
    e-mail me please: cs.sushko@gmail.com
    Saturday, April 25, 2009 4:39 PM