EasyManuals Logo
Home>Texas Instruments>Calculator>TI-89

Texas Instruments TI-89 Developer's Guide

Texas Instruments TI-89
1398 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #203 background imageLoading...
Page #203 background image
161
TI
-
89 / TI
-
92 Plus Developer Guide
Not for Distribution
Beta Version January 26, 2001
15. Expressions and the Expression Stack
This chapter explains the internal data structures used to represent expressions
and how the expression stack (estack) is used to do numeric and symbolic
operations.
15.1. Overview
The AMS Operating System (OS) evaluates both numeric and symbolic
expressions. Expressions are represented in a tagged internal representation
called tokenized form. The tokenized form explicitly represents the hierarchical
ordering of operations and their operands.
The system provides a tokenizer that uses a lexical scanner and a parser to
translate text strings into tokenized form. Tags are used to delimit each element
of this form. Numbers, variables, operations, and functions all have associated
tag values that identify them. However, some symbols that appear in the text
representation do not appear in the tokenized form. For example, delimiters such
as commas, parentheses, braces, and brackets are implied by the structure of
the tokenized form.
The system also provides a simplifier, which performs evaluation and
simplification. The simplifier attempts to reduce an expression to its simplest
form. It calls upon a variety of subsystems to perform the operations that are
specified by the expression. The work of the tokenizer and simplifier are
performed primarily on a stack structure called the expression stack.
Finally, the system provides a detokenizer. As the name implies, the detokenizer
translates the tokenized form of an expression into the corresponding text string.
The system also provides the means to convert the tokenized form into a pretty
printed form that can be displayed.
15.2. Contiguous Tokenized Polish Representation
The tokenizer produces a form called contiguous tokenized Polish
representation. In this representation an expression occupies one contiguous
block of memory allocated as an array of Quantums. A Quantum is defined in the
system by the C declaration:
typedef unsigned char Quantum;

Table of Contents

Other manuals for Texas Instruments TI-89

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Texas Instruments TI-89 and is the answer not in the manual?

Texas Instruments TI-89 Specifications

General IconGeneral
Display size (HxV)100 x 160 mm
Memory type639K FLASH ROM, 188K bytes RAM
Compatible operating systemsOperating System 2.09
Battery typeAAA

Related product manuals