| lxidnt |
|
Table of contents
Procedure
LXIDNT ( Lex identifier )
ENTRY LXIDNT ( IDSPEC, STRING, FIRST, LAST, NCHAR )
Abstract
Scan an identifier, starting from a specified character
position.
Required_Reading
None.
Keywords
CHARACTER
PARSING
SCANNING
STRING
UTILITY
Declarations
IMPLICIT NONE
INTEGER LBCELL
PARAMETER ( LBCELL = -5 )
INTEGER IDSPEC ( LBCELL : * )
CHARACTER*(*) STRING
INTEGER FIRST
INTEGER LAST
INTEGER NCHAR
Brief_I/O
VARIABLE I/O DESCRIPTION
-------- --- --------------------------------------------------
IDSPEC I Identifier character specification.
STRING I String to be scanned.
FIRST I Character position at which to start scanning.
LAST O Character position of end of token.
NCHAR O Number of characters in token.
LBCELL P The SPICE cell lower bound.
Detailed_Input
IDSPEC is an integer cell containing a specification of
the head and tail identifier character sets to be
used in scanning the input argument STRING. IDSPEC
should be obtained by calling LXDFID or LXCSID.
The structure of IDSPEC is not part of the
specification of this routine suite and should not
be relied upon by calling code.
STRING is a character string that may contain an
`identifier' starting at the character position
indicated by the input argument FIRST (see
below). Identifier tokens are sequences of
characters that represent names. Syntactically, an
identifier is a sequence of characters that begins
with a character belonging to a set of valid `head'
characters and is followed by zero or more
characters belonging to a set of valid `tail'
characters.
FIRST is the character position at which the routine
is to start scanning an identifier. Note
that the character STRING(FIRST:FIRST) must be a
valid head character if an identifier is to
be found; this routine does *not* attempt to locate
the first identifier following the position
FIRST.
Detailed_Output
LAST is the last character position such that the
substring STRING(FIRST:LAST) is an identifier, if
such a substring exists. Otherwise, the
returned value of LAST is FIRST-1.
NCHAR is the length of the identifier found by this
routine, if such a token exists. If an identifier
is not found, the returned value of NCHAR is
zero.
Parameters
LBCELL is the SPICE cell lower bound.
Exceptions
Error free.
1) If the input argument FIRST is less than 1 or greater than
LEN(STRING)-1, the returned value of LAST is FIRST-1, and the
returned value of NCHAR is zero.
Files
None.
Particulars
The default syntax rules for valid identifiers are specified in
the $Particulars section of the umbrella routine LXNAME. These
rules may be overridden by calling LXCSID.
Examples
See the $Examples section of the umbrella routine LXNAME.
Restrictions
None.
Literature_References
None.
Author_and_Institution
N.J. Bachman (JPL)
J. Diaz del Rio (ODC Space)
B.V. Semenov (JPL)
Version
SPICELIB Version 1.1.0, 26-OCT-2021 (JDR)
Added IMPLICIT NONE statement.
Edited the header to comply with NAIF standard.
SPICELIB Version 1.0.1, 10-FEB-2014 (BVS)
Added LBCELL to the $Declarations, $Brief_I/O, and $Parameters
sections.
SPICELIB Version 1.0.0, 25-OCT-1995 (NJB)
|
Fri Dec 31 18:36:33 2021