LPEX
3.6.6

com.ibm.lpex.jcl
Class JclParser

java.lang.Object
  extended by com.ibm.lpex.core.LpexCommonParser
      extended by com.ibm.lpex.jcl.JclParser
All Implemented Interfaces:
LpexConstants, LpexParser
Direct Known Subclasses:
JclParserJES2ESA

public class JclParser
extends LpexCommonParser

Document parser for MVS JCL.

The system-specific options used by JclParser are:

Actions and assigned keys added by this document parser for selective views of the cards, errors, and user tasks (TODOs) tagged in comments in the document:

Keys already defined (for example, by the active base editor profile and by the user profile) to an action different from nullAction are not redefined in here.

Action modified by this document parser:

Parser properties handled directly by this parser:

See Also:
getJclOptions()

Field Summary
static int OPTION_ESA
           
static int OPTION_JES2
           
static int OPTION_JES3
           
static int OPTION_XA
           
 
Fields inherited from class com.ibm.lpex.core.LpexCommonParser
ATTRIBUTES_COMMENT, ATTRIBUTES_COMMENT_KEYWORD, ATTRIBUTES_COMMENT1, ATTRIBUTES_DEFAULT, ATTRIBUTES_DIRECTIVE, ATTRIBUTES_ERROR, ATTRIBUTES_ERROR1, 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_COBOL400, LANGUAGE_COBOLILE, LANGUAGE_DDS, LANGUAGE_DLI, LANGUAGE_FORTRAN, LANGUAGE_HLASM, LANGUAGE_HTML, LANGUAGE_JAVA, LANGUAGE_JCL, LANGUAGE_LISP, LANGUAGE_PERL, LANGUAGE_PLI, LANGUAGE_REXX, LANGUAGE_RPG, LANGUAGE_RPGLEFIXED, LANGUAGE_RPGLEFREE, 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_COMMENT, MSG_POPUP_ERRORS, MSG_POPUP_EXCLUDESELECTION, MSG_POPUP_FILTERVIEWMENU, MSG_POPUP_INSERTMENU, MSG_POPUP_SELECTEDMENU, MSG_POPUP_SHOWALL, MSG_POPUP_SOURCEMENU, MSG_POPUP_TASKS, MSG_POPUP_UNCOMMENT, PARSE_PENDING_CHANGE_MASK, PARSE_PENDING_INSERT_MASK, PARSE_PENDING_NEXT_DELETED_MASK, PARSE_PENDING_NEXT_SHOW_DELETED_MASK, PARSE_PENDING_PREV_DELETED_MASK, PARSE_PENDING_PREV_SHOW_DELETED_MASK, PARSE_PENDING_UNDO_MASK, PLATFORM_AWT, PLATFORM_SWT, PLATFORM_SWT_KEY, SHOW_ALL, SHOW_DOCUMENT, SHOW_NONE, SHOW_VIEW, STATUS_FIELDS_NOINSERT, STATUS_FIELDS_TRUNCATE, 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, STATUS_TEXTLIMIT_OVERFLOW, STATUS_UNDO_NOTHINGUNDONE
 
Constructor Summary
JclParser(LpexView lpexView)
          Constructor.
 
Method Summary
 String getCommentStyleCharacters()
          Returns the style characters used for styling comments ("c$").
 int getJclOptions()
          Returns parser's system-specific JCL options.
 String getLanguage()
          Returns "JCL", the language supported by this parser.
protected  String getPopupItems(int popupLocation)
          Returns this parser's contribution to the popup.
 ResourceBundle getProfile()
          Returns the parser's properties profile resource bundle.
protected  void initParser()
          Initializes the parser.
 void parseAll()
          Total parse of the entire document.
 void parseElement(int element)
          Incremental parse.
protected  void propertySet(String key)
          Listens to changes to the taskTags parser property in this view.
 void setStyleAttributes()
          Defines parser's style attributes.
 
Methods inherited from class com.ibm.lpex.core.LpexCommonParser
addDocumentMessage, addMessage, addMessage, addMessage, blockMarkWord, copyDocumentMessages, cursorIndent, defineFilterAction, defineFilterAction, expandProtoKeyword, getInstallStyleAttributes, getLanguage, getLshToken, getProperty, getStyleName, getStyles, getTextIndent, getToken, getTokenLocation, indentText, indentText, indentText, isDebuggable, isPrimaryParser, isTokenDelimiter, isWordCharacter, lineComment, lpexView, matchToken, newLine, openLine, parse, removeDocumentMessages, removeMessages, removeMessages, resetParser, setProperty, setStyle, splitLine, styleString, terminateParser, tokenBegin, tokenEnd, totalParse
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OPTION_JES2

public static final int OPTION_JES2
See Also:
getJclOptions(), Constant Field Values

OPTION_JES3

public static final int OPTION_JES3
See Also:
getJclOptions(), Constant Field Values

OPTION_ESA

public static final int OPTION_ESA
See Also:
getJclOptions(), Constant Field Values

OPTION_XA

public static final int OPTION_XA
See Also:
getJclOptions(), Constant Field Values
Constructor Detail

JclParser

public JclParser(LpexView lpexView)
Constructor.

Parameters:
lpexView - the document view associated with this parser
Method Detail

initParser

protected void initParser()
Initializes the parser. Sets up the parser for the associated document view: sets style attributes, registers element classes, creates editor actions, redefines the popup, etc. for the language-sensitive edit features supported.

Overrides:
initParser in class LpexCommonParser
See Also:
Life cycle

getProfile

public ResourceBundle getProfile()
Returns the parser's properties profile resource bundle.

Overrides:
getProfile in class LpexCommonParser
See Also:
LpexCommonParser.getProperty(java.lang.String), Parser properties

getLanguage

public String getLanguage()
Returns "JCL", the language supported by this parser.

Overrides:
getLanguage in class LpexCommonParser
See Also:
LpexCommonParser.LANGUAGE_JCL

getJclOptions

public int getJclOptions()
Returns parser's system-specific JCL options. The parser uses two sets of options: JES2 / JES3, and ESA / XA.
JES2 or JES3 specifies the Job entry subsystem. The default is JES3.
ESA specifies that MVS/ESA JCL (JES level 4) is used; XA specifies that only MVS/XA JCL (JES level 2) is recognized. The default is ESA.

To modify these settings, extend JclParser and override this method.

See Also:
OPTION_JES2, OPTION_JES3, OPTION_ESA, OPTION_XA

propertySet

protected void propertySet(String key)
Listens to changes to the taskTags parser property in this view.

Overrides:
propertySet in class LpexCommonParser
Parameters:
key - base name of the parser property that was set, for example "autoIndent"
See Also:
LpexCommonParser.setProperty(String,String), LpexCommonParser.getProperty(java.lang.String), Parser properties

getPopupItems

protected String getPopupItems(int popupLocation)
Returns this parser's contribution to the popup. This parser contributes to the Filter view submenu (JOB statements, EXEC statements, DD statements, PROC statements, Errors, Tasks).

Overrides:
getPopupItems in class LpexCommonParser
Parameters:
popupLocation - the location on the pop-up menu of the items requested, one of:
LpexCommonParser.POPUP_TOP, LpexCommonParser.POPUP_FILTERVIEW, LpexCommonParser.POPUP_SOURCE, LpexCommonParser.POPUP_END
Returns:
this parser's contribution to the pop-up menu, or
null if none
See Also:
LpexCommonParser.defineFilterAction(java.lang.String, java.lang.String)

setStyleAttributes

public void setStyleAttributes()
Defines parser's style attributes. The following style characters are set: '_' (blank/unparsed characters), 'i' (in-stream data), 'z' (sequence number), '*' (delimiter), '(' (first-level parenthesis), ')' (second-level parenthesis), ',' (comma), '=' (equal sign), '.' (period), 'j' (job name), 's' (step name), 'r' (proc name), 'p' (proc step name), 'd' (DD name), 'c' (comment), '$' (comment task tag), 'e' (error), 'k' (keyword), 'b' (subkeyword), 'y' (keyword - symbolic), 'q' (quoted string), '/' (JCL statement prefix), 'o' (operation field), 'n' (command statement), 'x' (symbolic value), 'v' (parameter value), 'l' (control statement).


getCommentStyleCharacters

public String getCommentStyleCharacters()
Returns the style characters used for styling comments ("c$").

Overrides:
getCommentStyleCharacters in class LpexCommonParser

parseAll

public void parseAll()
Total parse of the entire document. Done initially, after a document has been loaded in the editor, after an updateProfile command, and after a change to the taskTags parser property.

Specified by:
parseAll in class LpexCommonParser
See Also:
Total and incremental parse

parseElement

public void parseElement(int element)
Incremental parse.

Specified by:
parseElement in class LpexCommonParser
Parameters:
element - an element affected by a committed change in this view
See Also:
LpexView.parsePending(int), LpexView.elementParsed(int), Total and incremental parse

LPEX
3.6.6

Copyright © 2012 IBM Corp. All Rights Reserved.

Note: This documentation is for part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.