Class PlatformSectionParser
java.lang.Object
com.ibm.dtfj.javacore.parser.j9.SectionParserGrammar
com.ibm.dtfj.javacore.parser.j9.SectionParser
com.ibm.dtfj.javacore.parser.j9.section.platform.PlatformSectionParser
- All Implemented Interfaces:
ISectionParser, ICommonTypes, IPlatformTypes
-
Field Summary
Fields declared in class SectionParser
fImageBuilder, LOOKAHEAD_DEPTHModifier and TypeFieldDescriptionprotected IImageBuilderprotected static final intDepth of at least 3 is needed for J9 javacores, as parsing a section from the start will yield three tokens: SECTION, header information token, first TAG of section (note that NULL lines are ignored by the scanner).Fields declared in class SectionParserGrammar
anyMatched, DEFAULT_DEPTH, fLookAheadBuffer, FORCE_THROW, fSectionName, fTagManager, fTagParserModifier and TypeFieldDescriptionprotected booleanprotected static final intprotected ILookAheadBufferprotected static final intprotected Stringprotected J9TagManagerprotected ITagParserFields declared in interface ICommonTypes
BUILD_INFO, COMMON, JIT_BUILD_VERSION, JIT_PRESENT, JRE_NAME, JRE_VERSION, NULL, POINTER_SIZE, SECTION, UNAVAILABLE_DATA, VM_VERSIONFields declared in interface IPlatformTypes
ENV_NAME, ENV_VALUE, PL_CPU_ARCH, PL_CPU_COUNT, PL_HOST_ADDR, PL_HOST_NAME, PL_MODULE_BASE, PL_MODULE_NAME, PL_MODULE_OFFSET, PL_OS_NAME, PL_OS_VERSION, PL_REGISTER_NAME, PL_REGISTER_VALUE, PL_SIGNAL, PLATFORM_SECTION, T_1XHENVVARS, T_1XHERROR2, T_1XHEXCPCODE, T_1XHEXCPMODULE, T_1XHREGISTERS, T_2XHCPUS, T_2XHENVVAR, T_2XHHOSTNAME, T_2XHOSLEVEL, T_2XHREGISTER, T_3XHCPUARCH, T_3XHNUMASUP, T_3XHNUMCPUSModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidsovOnlyRules(String startingTag) Empty hook for now.protected voidControls parsing for host platform (XH) section in the javacoreMethods declared in class SectionParser
addAsProperty, readIntoDTFJModifier and TypeMethodDescriptionbooleanaddAsProperty(Properties properties, String key, String value) voidreadIntoDTFJ(ILookAheadBuffer lookAheadBuffer, IImageBuilder imageBuilder) Pass in a lookahead buffer that is shared amongst all section parsers, pass in the DTFJ factory to construct the DTFJ objects as tags are being parsed.Methods declared in class SectionParserGrammar
anyMatched, consume, getCurrentFileLineNumber, getErrors, getLineRuleResults, getLookAheadBuffer, getSectionName, handleError, handleError, handleError, handleError, handleError, handleErrorAtLineNumber, handleRequiredMismatch, handleUnknownMismatch, isValidJavaCoreTag, isValidSectionTag, lookAhead, match, matchOptional, matchRequired, processTagLineOptional, processTagLineRequired, setLookAheadBuffer, setLookAheadBuffer, setTagManagerModifier and TypeMethodDescriptionbooleanprotected voidconsume()intReturns the current line number being parsed, or -1 if no parsing is occurring (parsing is finished, etc..).protected IAttributeValueMapgetLineRuleResults(IParserToken token) protected ILookAheadBufferprotected voidprotected voidhandleError(Exception e, int behaviour) protected voidhandleError(String message) protected voidhandleError(String message, int offset, int length) protected voidhandleError(String message, Exception e) protected voidhandleErrorAtLineNumber(int fileLineNumber, String message, Exception e) protected voidhandleRequiredMismatch(String expectedType, String actualType, String actualValue) protected voidhandleUnknownMismatch(String actualType, String actualValue) protected booleanisValidJavaCoreTag(IParserToken token) protected booleanisValidSectionTag(String tag) protected IParserTokenlookAhead(int depth) protected booleanThe match performs one additional function:
if the mismatch is due to an unrecognised javacore tag, that erroneous tag can be interpreted as garbage for now, so the latter is consumed without further processing.protected booleanmatchOptional(String type) Match a type, but do not generate an error if mismatch occurs.protected booleanmatchRequired(String type) Match a type, and generate an error if a mismatch occurs.protected IAttributeValueMapprocessTagLineOptional(String tagName) protected IAttributeValueMapprocessTagLineRequired(String tagName) protected voidsetLookAheadBuffer(ILookAheadBuffer lookAheadBuffer) protected voidsetLookAheadBuffer(ILookAheadBuffer lookAheadBuffer, int depth) protected voidsetTagManager(J9TagManager tagManager)
-
Constructor Details
-
PlatformSectionParser
public PlatformSectionParser()
-
-
Method Details
-
topLevelRule
Controls parsing for host platform (XH) section in the javacore- Specified by:
topLevelRulein classSectionParser- Throws:
ParserException
-
sovOnlyRules
Empty hook for now.- Specified by:
sovOnlyRulesin classSectionParser- Parameters:
startingTag-- Throws:
ParserException
-