Enhance my understanding of Compliers.
- Added a basic lexer.
- Implement lexical analysis phase to break down the source code into tokens.
- Develop a parser to build an abstract syntax tree (AST) from the token stream.
- Implement semantic analysis to perform type checking and ensure program correctness.
- Develop an intermediate code generation phase to convert the AST into an intermediate representation (IR).
- Implement optimization techniques to optimize the generated intermediate code.
- Develop a code generation phase to convert the optimized intermediate code into target machine code.
- Implement a symbol table to store and manage variable and function information.
- Develop error handling mechanisms to provide meaningful error messages to the user.
- Implement support for various data types, including integers, floating-point numbers, strings, arrays, and user-defined types.
- Develop a standard library for common BASIC functions and routines.
- Support for basic arithmetic and logical operations (e.g., addition, subtraction, multiplication, division, AND, OR).
- Control flow statements such as IF-THEN-ELSE, FOR-NEXT, WHILE-WEND, DO-LOOP, and GOTO.
- Subroutines and functions to allow code modularity and reusability.
- Input and output operations to interact with the user and the environment.
- Support for arrays and multidimensional arrays.
- String manipulation functions and operations.
- Error handling mechanisms, including runtime error detection and reporting.
- Support for user-defined types and structures.
- Integrated debugging features, such as breakpoints and step-by-step execution.
- Compatibility with the original BASIC language syntax and keywords.
- Optimization techniques to improve the performance of generated code.