We consider the problem of uniquely classifying operators in expressions containing binary, prefix unary, and suffix unary operators e.g. binary + (addition), prefix unary (negation), and suffix unary! (factorial). Since the same name may be used to represent distinct operators in different classes, the problem is one of refinement. In the general case, it can be recast in a grammatical frameword whose solution requires all parse trees of an ambiguous grammar. We consider a much simpler finite state solution. More specifically, we consider an automaton based algorithm which refines the classifications of each operator to a unique class (when it exists) as a function of the allowed classifications of the neighboring operators. We do not consider the more complicated problem where operand types effect the result.

Additional Metadata
Persistent URL dx.doi.org/10.1145/954051.954054
Journal ACM SIGPLAN Notices
Citation
Lalonde, W. (1979). A finite state approach to operator classification. ACM SIGPLAN Notices, 14(1), 46–54. doi:10.1145/954051.954054