org.gjt.sp.jedit.syntax
Class FortranTokenMarker

java.lang.Object
  extended by org.gjt.sp.jedit.syntax.TokenMarker
      extended by org.gjt.sp.jedit.syntax.FortranTokenMarker

public class FortranTokenMarker
extends TokenMarker

Custom TokenMarker for UNISYS's ASCII FORTRAN 77. Characteristics of this dialect are:

It should be easy enough to adapt this class for minor variations in the dialect so long as the format is the classic fixed column format. As this scanner is highly optimized for the fixed column format, it is probably not readily adaptable for freeform FORTRAN code.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.gjt.sp.jedit.syntax.TokenMarker
TokenMarker.LineInfo
 
Field Summary
 
Fields inherited from class org.gjt.sp.jedit.syntax.TokenMarker
firstToken, lastLine, lastToken, length, lineInfo, nextLineRequested
 
Constructor Summary
FortranTokenMarker()
          Constructor, with a wee bit of initialization.
 
Method Summary
static KeywordMap getKeywords()
          Return the keyword map.
 byte markTokensImpl(byte token, javax.swing.text.Segment line, int lineIndex)
          Implementation of code to mark tokens.
 
Methods inherited from class org.gjt.sp.jedit.syntax.TokenMarker
addToken, addToken, deleteLines, ensureCapacity, getLineCount, getMaxLineWidth, insertLines, isNextLineRequested, markTokens, setLineWidth, supportsMultilineTokens
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FortranTokenMarker

public FortranTokenMarker()
Constructor, with a wee bit of initialization.

Method Detail

markTokensImpl

public byte markTokensImpl(byte token,
                           javax.swing.text.Segment line,
                           int lineIndex)
Implementation of code to mark tokens.

Specified by:
markTokensImpl in class TokenMarker
Parameters:
token - The initial token type for this line
line - The line to be tokenized
lineIndex - The index of the line in the document, starting at 0
Returns:
The initial token type for the next line

getKeywords

public static KeywordMap getKeywords()
Return the keyword map. It's lazily initialized on the first call.



Copyright ? 2002 Romain Guy.