Dismiss
InnovationQ will be updated on Sunday, Oct. 22, from 10am ET - noon. You may experience brief service interruptions during that time.
Browse Prior Art Database

Syntax Selection in Electronics Calculators

IP.com Disclosure Number: IPCOM000081103D
Original Publication Date: 1974-Apr-01
Included in the Prior Art Database: 2005-Feb-27
Document File: 3 page(s) / 19K

Publishing Venue

IBM

Related People

Niehoff, WH: AUTHOR

Abstract

This description relates to the implementation of languages processed by electronic calculators of the nonstatement oriented type, that is, calculators which execute functions immediately after sufficient function or object tokens have been provided by the user to define an executable collection of tokens. The object of the method is a technique that enables the calculator to handle several language syntaxes, which may be selectable by the user or internally configured by the manufacturer.

This text was extracted from a PDF file.
At least one non-text object (such as an image or picture) has been suppressed.
This is the abbreviated version, containing approximately 58% of the total text.

Page 1 of 3

Syntax Selection in Electronics Calculators

This description relates to the implementation of languages processed by electronic calculators of the nonstatement oriented type, that is, calculators which execute functions immediately after sufficient function or object tokens have been provided by the user to define an executable collection of tokens. The object of the method is a technique that enables the calculator to handle several language syntaxes, which may be selectable by the user or internally configured by the manufacturer.

A token is defined as a language entity which is one of the following: a constant (e.g., 2.345), a function (e.g., +), a variable (e.g., the name A), a temporary result, or an empty token. Constants, variables, and temporaries will be termed "objects".

When the user keys in tokens, they arrive in temporal sequence. In the most general case, where the user is executing dyadic functions, he is interested in groups of three tokens arriving in sequence, i.e., a triplet (T1, T2, T3) where T1 arrives before T2, etc.

Given a triplet of three tokens, there are six ways (the six permutations) in which a triplet may be interpreted as a well-formed, executable syntactic entity. These are summarized and named in the table below where L classifies a token as an object used as a left-hand arithmetic argument, R classifies an object used as a right-hand arithmetic argument, and F classifies a dyadic function. (Monadic functions are simply handled within the context to be described and will not be discussed.)

Temporal Token Sequence Syntax Form Name T1 T2 T3

L F R left infix

R F L right infix

F L R left polish

F R L right polish

L R F left reverse polish

R L F right reverse polish.

In nonstatement-oriented calculators, results of previous calculations are frequently used as operands to an immediately subsequent function; hence, a temporary object will frequently fill temporal triplet component T1. Hence, in this class of machine, T1 must be L or R, and left and right polish notations are ruled out, leaving left and right infix and left and right reverse polish. Any and all of these forms are appropriate for calculators.

Left-directed forms are the most commonly used forms. However. right-directed infix and reverse polish are also pertinent. For example, any APL calculator must be right-directed. Furthermore, certain expressions are evaluated more easily by a right-directed mechanism, e.g., 2 over 1 3 over 1 4.

1

Page 2 of 3

In attempting to satisfy ail users' tastes and applications, one of the four syntax forms will usually not, by itself, handle the job ideally. Therefore, a machine which is capable of handling more than one or all forms is desir...