The development case, as it is, describes the development of a simple programming language using yacc and lex over six stages. hoc 1 and 2 represent stages 1 and 2.
So, hoc2 has the following capabilities:
- +,-,*,/,% floating point values
- nested parenthesis
- simple variables - a single lower case letter can be assigned a value
- expression terminating semicolon
- 2+3; 4*2; a=7.4;
- a basic system of interpreter commands is included, with only a single command: '?'
- typing '?' will print the result of the previous computation
Now come the next 4 stages...
No comments:
Post a Comment