Claims
- 1. A method in a computer system for determining an operand for an operator during data entry of the nodes of an intentional program tree, the method comprising:
- receiving a sequence of tokens, each token indicating a computational construct corresponding to a node of the intentional program tree;
- when receiving an indication of a selection of a subtree of the intentional program tree, selecting the indicated subtree; and
- when receiving an indication of a next token to be appended to the sequence of tokens,
- when a subtree is currently selected, identifying the selected subtree as an operand of the operator represented by the next token;
- when a subtree is not currently selected, identifying according to predefined rules of operator precedence an operand of the operator represented by the next token; and
- adding a node to the intentional program tree indicating the operator represented by the next token and indicating the identified operand
- whereby predefined rules of operator precedence may be overridden by selection of a subtree.
- 2. The method of claim 1 wherein the indication of the selection of a subtree is a shift tab.
- 3. The method of claim 1 wherein the operator is a binary operator and the identified operand is a left operand.
- 4. The method of claim 1 wherein when the selected subtree is an expression, displaying parenthesis around the expression.
- 5. The method of claim 1 wherein the predefined rules of operator precedence are in accordance with the C programming language.
- 6. A method in a computer system for determining an operand for an operator during data entry of the nodes of an intentional program tree, the method comprising:
- receiving a sequence of tokens, each token indicating a computational construct corresponding to a node of the intentional program tree
- adding a node to the intentional program tree for each token in the sequence;
- receiving an indication of a selection of a subtree of the intentional program tree; and
- after receiving the indication of the selection of the subtree,
- receiving an indication of a next token to be appended to the sequence of tokens;
- when the next token represents a binary operator, identifying a left operand of the binary operator as the selected subtree of the intentional program tree; and
- adding a node to the intentional program tree indicating the binary operator with the identified left operand.
- 7. The method of claim 6 wherein the indication of the selection of a subtree is a shift tab.
- 8. A method in a computer system for interpreted selection of an operand for an operator during data entry of the nodes of an intentional program tree, the method comprising:
- receiving a sequence of tokens, each token indicating a computational construct corresponding to a node of the intentional program tree;
- adding a node to the intentional program tree for each token in the sequence;
- receiving an indication of a next token to be appended to the sequence of tokens; and
- when the next token represents an operator,
- identifying an operand of the operator according to predefined rules of operator precedence; and
- adding a node to the intentional program tree indicating the operator with the identified operand.
- 9. The method of claim 8 wherein the predefined rules of operator precedence are in accordance with the C programming language.
- 10. The method of claim 8 wherein the operator is a binary operator and the identified operand is a left operand.
- 11. The method of claim 8 wherein the operand is identified according to the predefined rules of operator precedence so long as no portion of the intentional programming tree is currently selected.
- 12. A computer-readable medium containing instructions for causing a computer system select an operand for an operator during data entry of the nodes of an intentional program tree, the intentional program tree having nodes representing high-level computational constructs, by:
- receiving a sequence of tokens, each token indicating a computational construct corresponding to a node of the intentional program tree;
- when a received token represents an operator, identifying an operand of the operator according to predefined rules of operator precedence so long as no portion of the intentional program tree is currently selected; and
- adding a node to the intentional program tree indicating the operator with the identified operand.
- 13. The computer-readable medium of claim 12 wherein the predefined rules of operator precedence are in accordance with the C programming language.
- 14. The computer-readable medium of claim 8 wherein the operator is a binary operator and the identified operand is a left operand.
- 15. An editor in a computer system for generating an intentional program tree representing a computer program, the intentional program tree having nodes representing high-level computational constructs of the computer program, the editor comprising:
- a tokenizer for receiving a plurality of tokens and identifying a high-level computational construct represented by each token; and
- a component for adding nodes to the intentional program tree, the nodes representing the high-level computational constructs wherein when a high-level computational construct represents a binary operator selecting a left operand from the plurality of tokens in accordance with predefined rules of operator precedence so long as no portion of the intentional program tree is currently selected.
- 16. The editor of claim 15 including a display enzyme for each high-level computational construct and wherein after a token is received, using the display enzyme for the high-level computational construct that the token represents to display a representation of the token.
CROSS-REFERENCE TO RELATED APPLICATIONS
This application is a divisional of U.S. patent application Ser. No. 08/431,049, filed Apr. 28, 1995, which is a continuation-in-part of U.S. patent application Ser. No. 08/145,689, filed Oct. 29, 1993, now abandoned.
US Referenced Citations (15)
Foreign Referenced Citations (1)
Number |
Date |
Country |
0 361 737 |
Apr 1990 |
EPX |
Divisions (1)
|
Number |
Date |
Country |
Parent |
431049 |
Apr 1995 |
|
Continuation in Parts (1)
|
Number |
Date |
Country |
Parent |
145689 |
Oct 1993 |
|