← Back to context

Comment by nobody_special

5 hours ago

I wrote a BASIC interpreter that supported integers and strings circa 1979. Written in assembly, it used a simple precedence parser. I measured its CPU utilization under cpu-intensive loads: ~9.5% for lexical/token analysis, ~20% for the parser, and ~69.5% for semantic work.

It was a lot of fun. The assembler I used was really powerful; I used its macro facilities to create ‘rule’ macros that defined the BNF of the language.

Congrats on your own implementation!