Overview

 
Package  Use  Tree  Serialized  Deprecated  Index  Help 
SWT LPEX
v3.0.0
 PREV CLASS   NEXT CLASS FRAMES    NO FRAMES  
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


 

com.ibm.lpex.tpfhlasm
Class TPFHLAsmParser

java.lang.Object
  extended bycom.ibm.lpex.core.LpexCommonParser
      extended bycom.ibm.lpex.hlasm.HLAsmParser
          extended bycom.ibm.lpex.tpfhlasm.TPFHLAsmParser

All Implemented Interfaces:
LpexConstants, LpexParser


public class TPFHLAsmParser
extends HLAsmParser

HLASM (High Level Assembler) document parser for TPF (IBM Transaction Processing Facility).

Action added by this document parser:

Commands added by this document parser to query and set parser properties:


Field Summary
 
Fields inherited from class com.ibm.lpex.hlasm.HLAsmParser
classAll, classAsmMacroB, classAsmMacroE, classAsmMacroN, classAssemIns, classBackwardLink, classBranch, classCode, classComment, classContinue, classError, classForwardLink, classLabel, classMachineIns, classMacroCall, classOperand, classOperLine, classPendingOp, classQString, classRemark, classSequence, classUnknown, ITYPE_ASSEMBLER, ITYPE_ATTRIBUTES, ITYPE_MACHINE, ITYPE_REGISTERS, ITYPE_SPECIALS, ITYPE_UNDEFINED, ITYPE_USER, loaded_instructions, userMacrosRead, userReader
 
Fields inherited from class com.ibm.lpex.core.LpexCommonParser
ATTRIBUTES_COMMENT, ATTRIBUTES_COMMENT_KEYWORD, ATTRIBUTES_COMMENT1, ATTRIBUTES_DEFAULT, ATTRIBUTES_DIRECTIVE, ATTRIBUTES_ERROR, ATTRIBUTES_KEYWORD, ATTRIBUTES_KEYWORD1, ATTRIBUTES_LIBRARY, ATTRIBUTES_NONSOURCE, ATTRIBUTES_NUMERAL, ATTRIBUTES_STRING, ATTRIBUTES_STRING1, BACKGROUND_COLOR, CLASS_MESSAGE, LANGUAGE_CCPP, LANGUAGE_CICS, LANGUAGE_CL, LANGUAGE_COBOL, LANGUAGE_DDS, LANGUAGE_FORTRAN, LANGUAGE_HLASM, LANGUAGE_HTML, LANGUAGE_JAVA, LANGUAGE_JCL, LANGUAGE_LISP, LANGUAGE_PERL, LANGUAGE_PLI, LANGUAGE_REXX, LANGUAGE_RPG, LANGUAGE_SABRETALK, LANGUAGE_SQL, LANGUAGE_XMI, LANGUAGE_XML, LANGUAGE_XSL, LEXER_RC_END, LEXER_RC_EOF, LEXER_RC_MORE, LEXER_RC_OK, POPUP_END, POPUP_FILTERVIEW, POPUP_SOURCE, POPUP_TOP, PROTOKEY_EMPTY, STYLE_MESSAGE, STYLE_NAME, view
 
Fields inherited from interface com.ibm.lpex.core.LpexConstants
HELP_COMMAND_MAP, LPEX_VERSION, MSG_POPUP_ERRORS, MSG_POPUP_EXCLUDESELECTION, MSG_POPUP_FILTERVIEWMENU, MSG_POPUP_INSERTMENU, MSG_POPUP_SELECTEDMENU, MSG_POPUP_SHOWALL, MSG_POPUP_SOURCEMENU, PARSE_PENDING_CHANGE_MASK, PARSE_PENDING_NEXT_DELETED_MASK, PARSE_PENDING_NEXT_SHOW_DELETED_MASK, PARSE_PENDING_PREV_DELETED_MASK, PARSE_PENDING_PREV_SHOW_DELETED_MASK, PLATFORM_AWT, PLATFORM_SWT, PLATFORM_SWT_KEY, STATUS_FILE_ERRORREADING, STATUS_FILE_INCORRECTENCODING, STATUS_FILE_NOTFOUND, STATUS_FINDTEXT_INVALIDPATTERN, STATUS_FINDTEXT_NOTFOUND, STATUS_FINDTEXT_ONLYOCCURRENCE, STATUS_FINDTEXT_READONLY, STATUS_FINDTEXT_WRAPPED, STATUS_LOCATE_NOSEQUENCETEXT, STATUS_LOCATE_NOTFOUND, STATUS_LOCATE_WRAPPED, STATUS_SAVE_CANCELLED, STATUS_SAVE_FAILED, STATUS_TEXTLIMIT_ENFORCED
 
Constructor Summary
TPFHLAsmParser(LpexView lpexView)
          Constructor.
 
Method Summary
 void clearInstructionTable()
          Clears all HLASM, TPF, and USER instructions from the list.
protected  void createInstruction(int type, String lineX)
          This method is called when the instruction table is created.
static OrderedInstructionList getInstructions()
           
protected  BufferedReader getInternalTPFMacroFile()
          Opens the LPEX-shipped file "tpfhlasm.dat" for reading the TPF macros.
 String getParserPropertiesFileName()
          Returns the TPF HLASM parser profile.
protected  String getPopupItems(int popupLocation)
          Retrieve parser's contribution to the popup.
 int getPUTLevel()
          The PUT level is not a global parser variable - it can be different for each file.
 String getPUTLevelString()
           
 File getReadableTPFMacroFile()
          Returns the TPF macros file to use.
 String getTPFMacrosFileName()
          Returns the fully-qualified name of the TPF macros file.
protected  int getTypeOfTag(String tag)
          The TPF specific tags are "[TPF]" and "[TPFDF]".
 File getUserMacrosFile()
           
 String getUserMacrosFileName()
          Retrieve the fully-qualified name of the user macros file.
 String nextInstruction()
          First all built-in HLASM instructions are returned, then all built-in TPF instructions are returned, then user-provided macros will be returned.
protected  String nextTPFInstruction()
          Returns the next TPF instruction-format line.
protected  String nextUserInstruction()
          Retrieve the next user instruction-format line.
 void parseAll()
          The TPF version of this method first sets a PUT level to be used for parsing instructions.
 void parseElement(int changedElement)
          The TPF version of this method first sets a PUT level to be used for parsing instructions.
 void setCurrentCodeAssistElement(int element)
           
protected  void setDefaultPreferences()
          Sets the initial parser preference values.
 void setPUTLevel(int i_put_level, boolean update, boolean re_parse)
          Set a new PUT level for the document.
 void setPUTLevelString(String s_put_level, boolean update, boolean re_parse)
          Set a new PUT level for the document.
 void setShowingProposals(boolean showing)
           
 void setStyleAttributes()
          Define TPF-specific additional style attributes.
 void setTPFMacrosFile(String fileName, boolean macro_file_updated, boolean update, boolean re_parse)
          Set the fully-qualified name of the TPF macros file.
 void setUserMacrosFile(String fileName, boolean macro_file_updated, boolean update, boolean re_parse)
          Set the fully-qualified name of the user macros file.
 
Methods inherited from class com.ibm.lpex.hlasm.HLAsmParser
convertCaseToString, getBranchColoring, getBranchColoringString, getCaseSensitivityLevel, getCaseSensitivityLevelString, getCommentStyleCharacters, getCustomColorAssociations, getCustomColorFileLocation, getFileLocator, getInitialCommands, getInstructionColoring, getInstructionColoringString, getInstructionsSpecialColor, getLanguage, getNextValidColorChar, getProfile, getPropertyDefault, loadCustomInstructionColors, loadInstrTable, parseAllOpenFiles, performReParse, resetColorCharacters, retrieveMessage, setBranchColoring, setBranchColoringString, setCaseSensitivityLevel, setCaseSensitivityLevelString, setCustomColorFileLocation, setFileLocator, setInitialCommands, setInstructionColoring, setInstructionColoringString, terminateParser
 
Methods inherited from class com.ibm.lpex.core.LpexCommonParser
addMessage, addMessage, addMessage, blockMarkWord, cursorIndent, expandProtoKeyword, getInstallStyleAttributes, getLanguage, getLshToken, getPopupParserItems, getPopupViewItems, getProperty, getStyleName, getStyles, getTextIndent, getToken, getTokenLocation, indentText, indentText, indentText, isDebuggable, isTokenDelimiter, lineComment, lpexView, matchToken, newLine, openLine, parse, removeMessages, removeMessages, resetParser, setProperty, setStyle, splitLine, styleString, tokenBegin, tokenEnd, totalParse
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

 

 

TPFHLAsmParser

public TPFHLAsmParser(LpexView lpexView)

Constructor.

Method Detail

 

 

setCurrentCodeAssistElement

public void setCurrentCodeAssistElement(int element)


 

 

getInstructions

public static OrderedInstructionList getInstructions()


 

 

getPopupItems

protected String getPopupItems(int popupLocation)

Retrieve parser's contribution to the popup. Overrides HLAsmParser's to add "TPF macros" to the "Filter view" submenu.

Overrides:
getPopupItems in class HLAsmParser


 

 

setStyleAttributes

public void setStyleAttributes()

Define TPF-specific additional style attributes. One style character is added: 's' (TPF macro instruction).

Overrides:
setStyleAttributes in class HLAsmParser


 

 

getUserMacrosFileName

public String getUserMacrosFileName()

Retrieve the fully-qualified name of the user macros file.


 

 

getUserMacrosFile

public File getUserMacrosFile()


 

 

setUserMacrosFile

public void setUserMacrosFile(String fileName,
                              boolean macro_file_updated,
                              boolean update,
                              boolean re_parse)

Set the fully-qualified name of the user macros file. The user macro file is a global variable that is the same for all parser instances.

Parameters:
fileName - the fully-qualified name of the user macros file
macro_file_updated - if the file has been changed and needs to be reread, set this to true; otherwise, if the name does not change, the file is not reread
update - when the user macro file changes, the instruction table should be reloaded for changes to take effect; to perform this, set this argument to true, otherwise set it to false
re_parse - after the instruction table has been re-loaded, the file should be reparsed; set this to true to reparse the file now, or false to reparse later


 

 

setTPFMacrosFile

public void setTPFMacrosFile(String fileName,
                             boolean macro_file_updated,
                             boolean update,
                             boolean re_parse)

Set the fully-qualified name of the TPF macros file. The TPF macro file is a global variable that is the same for all parser instances.

Parameters:
fileName - the fully-qualified name of the user macros file
macro_file_updated - if the file has been changed and needs to be reread, set this to true; otherwise, if the name does not change, the file is not reread
update - when the user macro file changes, the instruction table should be reloaded for changes to take effect; to perform this, set this argument to true, otherwise set it to false
re_parse - after the instruction table has been re-loaded, the file should be reparsed; set this to true to reparse the file now, or false to reparse later


 

 

getTypeOfTag

protected int getTypeOfTag(String tag)

The TPF specific tags are "[TPF]" and "[TPFDF]".

Overrides:
getTypeOfTag in class HLAsmParser

Parameters:
tag - a tag found in a data file (user or hard coded), e.g., "[MACHINE]"
Returns:
a valid type if a match for the tag string is found; or null to indicate no match was found
See Also:
HLAsmParser.getTypeOfTag(String)


 

 

createInstruction

protected void createInstruction(int type,
                                 String lineX)

Description copied from class: HLAsmParser
This method is called when the instruction table is created. The method may be extended by subclasses to support additional instruction types.

Overrides:
createInstruction in class HLAsmParser

Parameters:
type -
lineX -
See Also:
HLAsmParser.createInstruction(int, String)


 

 

nextInstruction

public String nextInstruction()

First all built-in HLASM instructions are returned, then all built-in TPF instructions are returned, then user-provided macros will be returned. Once all have been retrieved, null is returned.

Overrides:
nextInstruction in class HLAsmParser

See Also:
HLAsmParser.nextInstruction()


 

 

nextUserInstruction

protected String nextUserInstruction()

Retrieve the next user instruction-format line. It is being called repeatedly to set up the parser's instructions table, until it returns null.


 

 

nextTPFInstruction

protected String nextTPFInstruction()

Returns the next TPF instruction-format line. This method is being called repeatedly to set up the parser's instructions table, until it returns null.


 

 

getReadableTPFMacroFile

public File getReadableTPFMacroFile()

Returns the TPF macros file to use. The name is specified by the parser property "global.tpf_macro_file", and the file is located by the current file locator.

Returns:
the TPF macros file, or
null if not successfully located
See Also:
HLAsmParser.getFileLocator()


 

 

getInternalTPFMacroFile

protected BufferedReader getInternalTPFMacroFile()

Opens the LPEX-shipped file "tpfhlasm.dat" for reading the TPF macros. The file is located in the com.ibm.lpex.tpfhlasm package. Here are the contents of this file.

This method is called when the TPF macros file specified by the parser property "global.tpf_macro_file" has not been found. Subclasses may override to return null if the internal TPF macros file should not be used.

Returns:
a BufferedReader, or null if not available


 

 

getTPFMacrosFileName

public String getTPFMacrosFileName()

Returns the fully-qualified name of the TPF macros file. The name of this file is specified by the parser property "global.tpf_macro_file".


 

 

clearInstructionTable

public void clearInstructionTable()

Clears all HLASM, TPF, and USER instructions from the list. It also resets related variables so that the table can be reloaded from scratch.

Overrides:
clearInstructionTable in class HLAsmParser

See Also:
HLAsmParser.clearInstructionTable()


 

 

setPUTLevelString

public void setPUTLevelString(String s_put_level,
                              boolean update,
                              boolean re_parse)

Set a new PUT level for the document.

Parameters:
s_put_level - the put level that should be used from now on for this file
update - changes should be made so that the new put level will take effect
re_parse - the document should be re-parsed; the changes made to the PUT level will not be seen until a reparse is made; when setting multiple variables, you may want to defer the reparse until all properties have been set


 

 

setPUTLevel

public void setPUTLevel(int i_put_level,
                        boolean update,
                        boolean re_parse)

Set a new PUT level for the document.

Parameters:
i_put_level - the put level that should be used from now on for this file
update - changes should be made so that the new put level will take effect
re_parse - the document should be re-parsed; the changes made to the PUT level will not be seen until a reparse is made; when setting multiple variables, you may want to defer the reparse until all properties have been set


 

 

getPUTLevel

public int getPUTLevel()

The PUT level is not a global parser variable - it can be different for each file. Each time a parse is made, the PUT level will be passed to the parse method, and parsing will be done according to the given PUT level. Because the PUT level is only used in TPF and not HLASM, the parse functions are not set up to pass this parameter. To get around this, the TPFmacros class has a static variable to store a PUT level. This static variable will be set for all instructions before any parse occurs.

Returns:
-1 = there is not put level being used; or positive number = the PUT level that is being used


 

 

getPUTLevelString

public String getPUTLevelString()


 

 

setDefaultPreferences

protected void setDefaultPreferences()

Sets the initial parser preference values. The default values are stored in the parser profile shipped with the editor. Altered settings are stored in the editor profile.

Overrides:
setDefaultPreferences in class HLAsmParser

See Also:
HLAsmParser.setDefaultPreferences()


 

 

getParserPropertiesFileName

public String getParserPropertiesFileName()

Returns the TPF HLASM parser profile.

Overrides:
getParserPropertiesFileName in class HLAsmParser

See Also:
HLAsmParser.getParserPropertiesFileName()


 

 

parseAll

public void parseAll()

The TPF version of this method first sets a PUT level to be used for parsing instructions.

Overrides:
parseAll in class HLAsmParser


 

 

parseElement

public void parseElement(int changedElement)

The TPF version of this method first sets a PUT level to be used for parsing instructions.

Overrides:
parseElement in class HLAsmParser

Parameters:
changedElement - an element whose committed change triggered the parse, or the element that precedes / follows a deleted block. The parser may identify other neighbouring elements that will have to be reparsed as a unit


 

 

setShowingProposals

public void setShowingProposals(boolean showing)


 

Overview

 
Package  Use  Tree  Serialized  Deprecated  Index  Help 
SWT LPEX
v3.0.0
 PREV CLASS   NEXT CLASS FRAMES    NO FRAMES  
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD