Go to the first, previous, next, last section, table of contents.


Syntax of Text Tokens

This section describes the accepted syntax for text tokens used by the various modules within the OOC library. These definitions apply to read operations on text, and to modules like section Module IntStr, section Module RealStr, and section Module LRealStr, which convert between string values and numeric representation.

These may also apply to write operations for text, but there are some cases (like writer.WriteString in section Class Writer (TextRider)) that do not strictly adhere to these definitions. Also note that internal representation of strings is different from text representation of strings.

An identifier, sometimes referred to as a name, has the form

  letter {letter | decimal_digit}

(Note that an underscore `_' is not considered to be part of an identifier, nor is a selector `.')

A string has the form

  """ {non_control_char} """ |
  "'" {non_control_char} "'".

where a non-control char is any character with an ordinal value greater than or equal to a space character (i.e., `non_control_char >= 20X').

A signed whole number (used to represent an integer value) has the form

  ["+" | "-"] decimal_digit {decimal_digit}.

An unsigned hexadecimal number (used to represent an integer value) has the form

  ["+" | "-"] decimal_digit {hex_digit}.

where a hex digit is one of `0..9' or `A..F'. (Note that lower-case letters, `a..f', are not valid hex digits.)

A signed fixed-point real number has the form

  ["+" | "-"] decimal_digit {decimal_digit} ["." {decimal_digit}].

A signed floating-point real number has the form

  ["+" | "-"] decimal_digit {decimal_digit} ["." {decimal_digit}]
              ("E" | "e") ["+" | "-"] decimal_digit {decimal_digit}.

A set constructor has the form

  "{" [set_element {"," set_element}] "}".

where a set element has the form

  set_value [".." set_value].

with set value being an integer number in the range `0..MAX(SET)'.


Go to the first, previous, next, last section, table of contents.