anchor.diff:  !     PERFORM ACTION
         SELECT CASE (ACTN)
         CASE(ERR)
  -        CALL SCNERR(INP,I,STATE)
  +        CALL SCNERR(INP,I,CUR%STATE)
           GOTO 8999
         CASE(NEW)
  -        STRT = I
  -        ENDT = STRT
  +        CUR%STRT = I
  +        CUR%ENDT = CUR%STRT
         CASE(PUSH)
  -        ENDT = ENDT + 1
  +        CUR%ENDT = CUR%ENDT + 1
         CASE(FLSH)
  -        IF (STATE.NE.WHIT) THEN
  +        IF (CUR%STATE.NE.WHIT) THEN
             NTOK = NTOK + 1
  -          TOKLST(1,NTOK) = STATE
  -          TOKLST(2,NTOK) = STRT
  -          TOKLST(3,NTOK) = ENDT
  -          WRITE(6,9021)STATE,STRT,ENDT, &
  -                       REPEAT(' ',STRT-1)//INP(STRT:ENDT)
  +          TOKLST(NTOK) = CUR
  +          WRITE(6,9021)CUR%STATE,CUR%STRT,CUR%ENDT, &
  +                       REPEAT(' ',CUR%STRT-1)//INP(CUR%STRT:CUR%ENDT)
           END IF
  -        STRT = I
  -        ENDT = STRT
  +        CUR%STRT = I
  +        CUR%ENDT = CUR%STRT
         END SELECT
  - 1001 STATE = NXTST
  -!
  -      IF (ENDT.GE.STRT.AND.STATE.NE.WHIT) THEN
  + 1001 CUR%STATE = NXTST
  +!
  +      IF (CUR%ENDT.GE.CUR%STRT.AND.CUR%STATE.NE.WHIT) THEN
           NTOK = NTOK + 1
  -        TOKLST(1,NTOK) = STATE
  -        TOKLST(2,NTOK) = STRT
  -        TOKLST(3,NTOK) = ENDT
  -        WRITE(6,9021)STATE,STRT,ENDT, &
  -                       REPEAT(' ',STRT-1)//INP(STRT:ENDT)
  +        TOKLST(NTOK) = CUR
  +        WRITE(6,9021)CUR%STATE,CUR%STRT,CUR%ENDT, &
  +                       REPEAT(' ',CUR%STRT-1)//INP(CUR%STRT:CUR%ENDT)
         END IF
   !
    8999 RETURN
  
positive.code:                   COMA,    97,   122,  FLSH,   IDEN,             &     !  a - z 
  !                                                                     
                    99999, 99999, 99999,   ERR,   UNKN   /
        CONTAINS
  !------------------------------------------------------------------------------+
        SUBROUTINE SCAN(INP)
        IMPLICIT NONE
        CHARACTER INP*(*),C
        INTEGER I,J,LNGTH,STATE,ACTN,NXTST,IND
        INTEGER STRT,ENDT
        WRITE(6,9001) TRIM(INP)
        WRITE(6,9011)
  !
  !     INIT
        LNGTH =  LEN_TRIM(INP)
        STATE =  UNKN
        ACTN  =  ERR
        NTOK  =  0
  !
  
negative.code: ! TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
  ! SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  !------------------------------------------------------------------------------+
  !
  !
  !
  !------------------------------------------------------------------------------+
  !--------------------------- M O D _ V A R I A B L E S ------------------------+
  !------------------------------------------------------------------------------+
        MODULE MOD_VARIABLES
        INTEGER               :: VCNT
        INTEGER,PARAMETER     :: MAXVCNT=128, MAXNSZ=8, MAXVSZ=128
  