Parsing And The Evaluation Of Arithmetic Expressions

Justin R Smith · 1993

Abstract This essentially amounts to an implementation of a scanner. In the present section we will show how a parser (at least for certain simple grammars) can also be implemented on such a machine. It follows that for certain simple programming languages (ones whose grammar is a operator-precedence grammar), the whole front end of a compiler can be implemented on a SIMD machine We then show how certain operations similar to those in the code-generation part of a compiler can also be efficiently implemented on a SIMD machine. Essentially the algorithm presented here will take a syntax tree for an arithmetic expression (this is the output of the parser) and evaluate the expression, but it turns out not to be much more work to generate code to compute the expression.

Read the paper · More papers on PaperTik