{
{   NOTE:
{     ***********************************************************************
{     ***********************************************************************
{     ****** This program interface is obsolete.  Modules presently    ******
{     ****** using it should be changed to use CLP$EVALUATE_TOKEN.     ******
{     ***********************************************************************
{     ***********************************************************************
{
{   The purpose  of this request is to scan the next lexical unit (token) in a
{ text string.  On input, the index indicates where to  begin  scanning  text.
{ On  output,  the  index  indicates  where  scanning  stopped (i.e.  the next
{ character, if any, to be scanned).
{
{   The text_index field of the token is set to the input value of index.  The
{ text_size  field of the token is set to the number of characters occupied by
{ the token in the text (i.e.  output value of index - token.text_index).  The
{ descriptor  field  of the token is set to a string that describes the token,
{ e.g.  for use in error messages.
{
{   Name tokens are left justified and  checked  for  size  not  exceeding  31
{ characters.   Lower case letters are converted to upper case.  Names must be
{ delimited at both ends.  The following definitions illustrate the syntax  of
{ a name:
{
{    clc$name_token ::= <alphabetic char> [<alphanumeric char>]...
{    <alphanumeric char> ::= <alphabetic char> | <digit>
{    <alphabetic char> ::= <letter> | _ | $ | # | @
{
{   Integer tokens may have radix specifications and must be delimited at both
{ ends.  The  default  radix  is  decimal  (10).   The  following  definitions
{ illustrate the syntax of integers:
{
{   clc$integer_token ::=  <digit> [<hex digit>]... [<(> <radix> <)>]
{
{   Real tokens,  must have fractional portions and may have an exponent and a
{ sign.  Example: 123.456e+3 The following definitions illustrate  the  syntax
{ of real numbers:
{
{    clc$real_token ::=  <mantissa> [<exponent>]
{    <mantissa> ::= <integer part> <.> <fraction part>
{    <integer part> ::= <unsigned decimal>
{    <fraction part> ::= <unsigned decimal>
{    <exponent> ::= <E|e> [<+|->] <unsigned decimal>
{    <unsigned decimal> ::= <digit>...
{
{   Strings must be enclosed in apostrophes  (single  quote  marks).   In  the
{ token,  the enclosing apostrophes are removed and doubled apostrophes within
{ the original string are replaced by  a  single  apostrophe.   The  following
{ definitions illustrate the syntax of strings:
{
{    clc$string_token ::= ' [<string char>]... '
{    <string char> ::= <any ascii character except '> | ''
{
{   Spaces preceding  and/or  following  commas,  equal  signs,   semi-colons,
{ reverse  slants  and  ellipsis  tokens  are  treated  as  part of the actual
{ delimiter.  The  following  definitions  illustrates  the  syntax  of  these
{ delimiters:
{
{    clc$comma_token ::= [<sp>] , [<sp>]
{    clc$assign_token ::= [<sp>] = [<sp>]
{    clc$semicolon_token ::= [<sp>] ; [<sp>]
{    clc$rslant_token ::= [<sp>] \ [<sp>]
{    clc$ellipsis_token ::= [<sp>] .. [.]... [<sp>]
{
{   Spaces following  but  not  preceding left parenthesis, left bracket, left
{ brace and query tokens are treated as part of  the  actual  delimiter.   The
{ following definitions illustrate the syntax of these delimiters:
{
{    clc$lparen_token ::= ( [<sp>]
{    clc$lbracket_token ::= [ [<sp>]
{    clc$lbrace_token ::= { [<sp>]
{    clc$query_token ::= ? [<sp>]
{
{   Spaces preceding but not following right parenthesis, right  bracket,  and
{ right  brace  tokens  are  treated  as  part  of  the actual delimiter.  The
{ following definitions illustrate the syntax of these delimiters:
{
{    clc$rparen_token ::=  [<sp>] )
{    clc$rbracket_token ::= [<sp>] ]
{    clc$rbrace_token ::= [<sp>] }
{
{   Spaces either preceding or following the dot  and  colon  tokens  are  not
{ treated  as  part  of  the  actual  delimiter.   The  following  definitions
{ illustrate the syntax of these delimiters:
{
{    clc$dot_token ::= .
{    clc$colon_token ::= :
{
{   Spaces preceding  and/or  following  the  exponentiate,  multiply, divide,
{ concatenate, greater than, greater than or equal to, less than, less than or
{ equal  to,  equal  to,  and  not  equal to tokens are treated as part of the
{ actual operator.  The following definitions illustrate the syntax  of  these
{ operators:
{
{    clc$exp_token ::= [<sp>] ** [<sp>]
{    clc$mult_token ::= [<sp>] * [<sp>]
{    clc$div_token ::= [<sp>] / [<sp>]
{    clc$cat_token ::= [<sp>] // [<sp>]
{    clc$gt_token ::= [<sp>] > [<sp>]
{    clc$ge_token ::= [<sp>] >= [<sp>]
{    clc$lt_token ::= [<sp>] < [<sp>]
{    clc$le_token ::= [<sp>] <= [<sp>]
{    clc$eq_token ::= [<sp>] = [<sp>]
{    clc$ne_token ::= [<sp>] <> [<sp>]
{
{   Spaces following but not preceding add and subtract tokens are treated  as
{ part  of  the  actual  operator.   The  following definitions illustrate the
{ syntax of these operators:
{
{    clc$add_token ::= + [<sp>]
{    clc$sub_token ::= - [<sp>]
{
{   Contiguous spaces  occurring  other  than  as described above, are treated
{ collectively as a clc$space_token.  The horizontal  tab  (HT)  character  is
{ treated  identically  to the space character.  Also, comments are treated as
{ spaces.
{
{   Any character that  does  not  begin  a  token  previously  described,  is
{ returned as a clc$unknown_token.
{
{
{       CLP$SCAN_TOKEN (TEXT, INDEX, TOKEN, STATUS)
{
{ TEXT: (input) This parameter specifies the text to be scanned.
{
{ INDEX: (input, output) This parameter specifies the  next  character  within
{       TEXT to be scanned.
{
{ TOKEN: (output) This parameter specifes the token.
{
{ STATUS: (output) This parameter specifies the request status.
{       CONDITIONS: clc$min_ecc_lexical ..  clc$max_ecc_lexical
{       IDENTIFIER: 'CL'
{
