Project will consist of 1 implementation in Java.
**Basic Interpreter Project**
This project will be to write an interpreter for a minimal form of BASIC. The major project for the quarter will be to write an interpreter for a minimal form of BASIC. This minimal form of BASIC has only 1 data type, integer, and the only identifiers are single capital letters (i.e. there are only 26 possible identifiers). There are only 6 types of statements in this form of BASIC:
1) LET statement LET {variable} = {expression}
2) IF statement IF {expression} GOTO {line number}
3) GOTO statement GOTO {line number}
4) PRINT statement PRINT {variable}
5) STOP statement
6) END statement
Each statement must be preceded by a line number. For convenience, each line number must be between 1 and 999. Also, the expressions will be either a variable, a constant, or a simple arithmetic operation (addition, subtraction, multiplication, or division). The interpreter will parse the BASIC program and build some intermediate data structures. These data structures will then be interpreted to execute the program. The parsing algorithm should detect any syntactical or semantic error. The first such error discovered should cause an appropriate error message to be printed, and then the interpreter should abort. Run-time errors should also be detected with appropriate error messages being printed.
## Deliverables
1) Complete and fully-functional lexical analyzer and parser in executable form as well as complete source code of all work done.
2) Exclusive and complete copyrights to all work purchased. (No GPL, GNU, 3rd party components, etc. unless all copyright ramifications are explained AND AGREED TO by the buyer on the site per the coder's Seller Legal Agreement).
Grammar of program is as follows:
→
→ |
→ EOLN
→ | | | |
→ LET =
→ GOTO
→ IF GOTO
→ PRINT
→ STOP
→ 0 .. 999
→ 'A' .. 'Z'
→
→ < | | >= | == |
→ + | - | * | / | |
→ 0 .. “maxint”
I have taught compiler courses to Undergrads. So this project is very easy to do. So I can do this in days. I myself created compiler for SQL, PROLOG, ML and LISP. So It is very easy to do this project.
I have extensive experience in programming language design and implementation spanning the last 15 years, and have implemented interpreters for functional and object-oriented languages in the past. I am also a native English speaker, so can guarantee high-quality documentation. This simple language should be achievable within a few days, thanks to your clear specification. I will deliver a fully-commented implementation complete with tokenizer (using a finite state machine) parser (probably written using a recursive-descent style, as that seems simplest for this grammar) and interpreter (simple sequential execution), along with unit tests for all three phases. The only external dependency I will use is junit for tests, which will not be required for final deployment so copyright should not be an issue.
I am a professional developer with 20+ years of experience in the development of grammars, parsers, compilers, interpreters and computer language analysis. Have successfully implemented parsers for C, C++, VHDL, Verilog, Forth, and a variety of expression evaluators and reporting languages.
I will deliver a well-structured and documented production-quality tokeniser, recursive descent parser and stack-based interpreter with unit-tests.