![]() | ![]() | ![]() | ![]() |
![]() | What it is (Only for Developers) DC3 is a complete but limited (because I've neither the time nor the will to enhance it) VB like compiler/interpreter that can be used for learning how to create a complete and fully functional compiler. It comes with its complete source code in Visual Basic 6. It compiles simple VB like programs and creates a byte code executed by a Virtual Machine, like Java and .NET languages. | ||
![]() | ![]() | ||
![]() | |||
![]() | Compiler Definition A compiler is a specialized computer program that converts source code written in one programming language into another language, usually machine language (also called object code or machine code) so that it can be understood by computer processors. Source code is the version of software (usually an application program or an operating system) as it is originally written (i.e., typed into a computer) by a human in plain text (i.e., human readable alphanumeric characters). Source code can be written in any of numerous programming languages, some of the most popular of which are C, C++, Java, Perl, PHP, Python and Tcl/Tk. Compiler Structure and Operation Compilers are very complex programs, and compiler design is a very complicated task (and an excellent way to deepen ones understanding of computer science). Compiling has several phases. They include extracting words from the source code, analyzing the sequence of such words and checking whether they match the syntax of the programming language for which the compiler is intended. While doing this, a compiler must adhere strictly to the meaning of the program being compiled. Compiling Versus Interpreting Not all source code is compiled. With some programming languages (e.g., Perl and Tcl and DC3) the source code is executed by using an interpreter rather than first compiling it and then executing the resulting machine code. An interpreter is a program that reads source code one statement at a time, translates the statement into machine code, executes the machine code statement, then continues with the next statement. It is generally faster to run compiled code than to run a program under an interpreter. This is largely because the interpreter must analyze each statement in the source code each time the program is executed and then perform the desired conversion, whereas this is not necessary with compiled code because the source code was fully analyzed during compilation. However, it can take less time to interpret source code than the total needed to both compile and run it, and thus interpreting is frequently used when developing and testing source code for new programs. |