mars.venus.editors.jeditsyntax.tokenmarker
Class MIPSTokenMarker
java.lang.Object
mars.venus.editors.jeditsyntax.tokenmarker.TokenMarker
mars.venus.editors.jeditsyntax.tokenmarker.MIPSTokenMarker
public class MIPSTokenMarker
- extends TokenMarker
MIPS token marker.
- Author:
- Pete Sanderson (2010) and Slava Pestov (1999)
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MIPSTokenMarker
public MIPSTokenMarker()
MIPSTokenMarker
public MIPSTokenMarker(KeywordMap keywords)
getMIPSTokenLabels
public static String[] getMIPSTokenLabels()
getMIPSTokenExamples
public static String[] getMIPSTokenExamples()
markTokensImpl
public byte markTokensImpl(byte token,
Segment line,
int lineIndex)
- Description copied from class:
TokenMarker
- An abstract method that splits a line up into tokens. It
should parse the line, and call
addToken()
to
add syntax tokens to the token list. Then, it should return
the initial token type for the next line.
For example if the current line contains the start of a
multiline comment that doesn't end on that line, this method
should return the comment token type so that it continues on
the next line.
- Specified by:
markTokensImpl
in class TokenMarker
- Parameters:
token
- The initial token type for this lineline
- The line to be tokenizedlineIndex
- The index of the line in the document, starting at 0
- Returns:
- The initial token type for the next line
getTokenExactMatchHelp
public ArrayList getTokenExactMatchHelp(Token token,
String tokenText)
- Construct and return any appropriate help information for
the given token.
- Overrides:
getTokenExactMatchHelp
in class TokenMarker
- Parameters:
token
- the pertinent Token objecttokenText
- the source String that matched to the token
- Returns:
- ArrayList of PopupHelpItem objects, one per match.
getTokenPrefixMatchHelp
public ArrayList getTokenPrefixMatchHelp(String line,
Token tokenList,
Token token,
String tokenText)
- Construct and return any appropriate help information for
prefix match based on current line's token list.
- Overrides:
getTokenPrefixMatchHelp
in class TokenMarker
- Parameters:
line
- String containing current linetokenList
- first Token on current line (head of linked list)token
- the pertinent Token objecttokenText
- the source String that matched to the token in previous parameter
- Returns:
- ArrayList of PopupHelpItem objects, one per match.
getKeywords
public static KeywordMap getKeywords()
- Get KeywordMap containing all MIPS key words. This includes all instruction mnemonics,
assembler directives, and register names.
- Returns:
- KeywordMap where key is the keyword and associated value is the token type (e.g. Token.KEYWORD1).