
 *Parser Profile for IBM FORTRAN/2 programs
 * Copyright (C) IBM corp 1993
 * By: Tom Flemming, April 27th, 1989
 
lists
 
states if fs si fk ik format istr ck string comment errline inline cmdline d6 d5 d4 d3 d2 s6 s5 s4 s3 s2 s1
 
symbols nonexec if format name punctuation rcommand program operator qin quote number comment space debug digit five all zero any
 
classes label sub comment error code 
 
states
 
state s1 spacetrap
fonts comment C five _ space _ debug D digit L
changes five s6 comment comment space s2 debug s2 digit d2
unknown errline
end
 

 
state s2 spacetrap
fonts space _ digit L
changes space s3 digit d3
unknown errline
end
  
state s3 spacetrap
fonts space _ digit L
changes space s4 digit d4
unknown errline
end
  
state s4 spacetrap
fonts space _ digit L
changes space s5 digit d5
unknown errline
end
  
state s5 spacetrap
fonts space _ digit L
changes space s6 digit d6
unknown errline
end
 
state s6 spacetrap
 *check for continuation line.
fonts space _ zero N any F
changes space cmdline zero cmdline any inline
end
 
state d2 spacetrap
fonts space _ digit L
changes space d3 digit d3
unknown errline
end
  
state d3 spacetrap
fonts space _ digit L
changes space d4 digit d4
unknown errline
end
  
state d4 spacetrap
fonts space _ digit L
changes space d5 digit d5
unknown errline
end
  
state d5 spacetrap
fonts space _ digit L
changes space d6 digit d6
unknown errline
end
 
state d6 spacetrap
fonts space _ zero N
changes space cmdline zero cmdline
unknown errline
end
  
state comment
fonts all C
end
 
state errline
fonts all E
end
 
state cmdline
fonts  program S rcommand K nonexec M format M name A
changes name inline program inline rcommand inline nonexec inline format format 
unknown errline
end
 
state inline 
fonts rcommand K nonexec M program S name A operator P punctuation P number N quote Q any E
changes quote string
end
 
state string
fonts quote Q qin Q
changes quote inline
return istr
end
 
state istr spacetrap
fonts five _
changes five ck
unknown s1
end
 
state ck spacetrap
 *check it is a continuation line, for continued string
fonts space _ zero N any F                    
changes space cmdline zero cmdline any string 
end                                           
 
state format
fonts punctuation P if A quote Q any E
changes quote fs
return if
end
 
state fs
 * string in a Format statement
fonts quote Q qin Q
changes quote format
return si
end
 
state si spacetrap
fonts five _
changes five fk
unknown s1
end
 
state fk spacetrap
 *check it is a continuation line, for continued string in a FORMAT
fonts space _ zero N any F                    
changes space cmdline zero cmdline any fs 
end                                           
 
state if spacetrap
fonts five _
changes five ik
unknown s1
end
 
state ik spacetrap
 *check it is a continuation line, for continued FORMAT
fonts space _ zero N any F                    
changes space cmdline zero cmdline any format
end                                           
 
symbols
 
symbol all
form
!
 
symbol space
form
'  '
 
symbol any
form
.
 
symbol five
form
'      '
     *one extra space - escape sequence
 
symbol digit
form
0
 
symbol comment
form
[' >C','*']
 
symbol debug
form
' >D'
 
symbol zero
form 
'0'
 
symbol name
form
[A,a]({[$,'_','$']})
 
symbol punctuation
sizelist small
(
)
*
+
,
-
.
/
:
<
=
>
\
_
 
symbol number
form
[#('.'),'.'](#)([' >E',' >D']('-','+')#)
 
symbol qin
form
/''''''
 
symbol quote
form
''''
 
symbol program
alphalist upper small &
BLOCK
ENTRY
FUNCTION
PROGRAM
SUBROUTINE
 
symbol format
alphalist upper single &
FORMAT
 
symbol if
form
[$,'$','_']
 
symbol nonexec
alphalist upper small &
CHARACTER
COMMON
COMPLEX
DATA
DIMENSION
DOUBLE
EJECT
EQUIVALENCE
EXTERNAL
IMPLICIT
INCLUDE
INTEGER
INTRINSIC
LOGICAL
PARAMETER
PRECISION
REAL
SAVE
 
 
symbol rcommand
alphalist upper small &
ASSIGN
BACKSPACE
CALL
CLOSE
CONTINUE
DBLE
DO
ELSE
ELSEIF
END
ENDFILE
ENDIF
GO
GOTO
IF
INQUIRE
OPEN
PAUSE
PRINT
READ
RETURN
REWIND
STOP
THEN
TO
WRITE
 
symbol operator
alphalist upper small '.'&'.'
.AND.
.EQ.
.EQV.
.GE.
.GT.
.LE.
.LT.
.NE.
.NEQV.
.NOT.
.OR.
 
 
 
classes
 
class comment
needed C
not
 
class error
needed E
not
 
class code
needed K || A || P || N || Q || S
not
 
class label
needed L
not 
 
class sub
needed S
not
 
end
   *that's all!
