Prism Compiler
The compiler begin its process by accepting a source file as its input. This source file is written in a specific programming language that the compiler is designed to understand. The source file contains the code that needs to be compiled. In Prism language, all the file end with '.pr
'.
Once the source file is received, the compiler call a specific function responsible for parsing. Parsing is a crucial step where the compiler reads and analyzes the source code to understand its structure and syntax.
The compiler includes a '-dasm
' flag option. When this flag is used, the compiler displays the generated instructions in a disassembled format. Disassembly is the process of translating machine code into a more human-readable form. This option is particularly useful for debugging and understanding how the high-level code translates into lower-level machine instructions.
In the absence of the '-dasm
' flag, the compiler default behavior is to generate bytecode from the source file. Bytecode is a low-level set of instructions that is more abstract than machine code and is typically used for further processing by an interpreter or a virtual machine. This bytecode is stored in a separate file, effectively transforming the original source code into a form that can be executed by the computer.
Last updated