Package edu.hm.hafner.analysis.parser
Class MentorParser
- java.lang.Object
-
- edu.hm.hafner.analysis.IssueParser
-
- edu.hm.hafner.analysis.LookaheadParser
-
- edu.hm.hafner.analysis.parser.MentorParser
-
- All Implemented Interfaces:
Serializable
public class MentorParser extends LookaheadParser
Parser for Mentor Graphics Modelsim/Questa Simulator.- Author:
- Derrick Gibelyou
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static longserialVersionUID-
Fields inherited from class edu.hm.hafner.analysis.LookaheadParser
ANT_TASK
-
-
Constructor Summary
Constructors Constructor Description MentorParser()Creates a parser for MentorGraphics Modelsim/Questa logs.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Optional<Issue>createIssue(Matcher matcher, edu.hm.hafner.util.LookaheadStream lookahead, IssueBuilder builder)Creates a new issue for the specified pattern.protected booleanisLineInteresting(String line)Returns whether the specified line is interesting.-
Methods inherited from class edu.hm.hafner.analysis.LookaheadParser
parse, postProcess
-
Methods inherited from class edu.hm.hafner.analysis.IssueParser
accepts, equalsIgnoreCase, isXmlFile, parseFile
-
-
-
-
Field Detail
-
serialVersionUID
public static final long serialVersionUID
- See Also:
- Constant Field Values
-
-
Method Detail
-
createIssue
protected Optional<Issue> createIssue(Matcher matcher, edu.hm.hafner.util.LookaheadStream lookahead, IssueBuilder builder)
Description copied from class:LookaheadParserCreates a new issue for the specified pattern. This method is called for each matching line in the specified file. If a match is a false positive, then returnOptional.empty()to ignore this warning.- Specified by:
createIssuein classLookaheadParser- Parameters:
matcher- the regular expression matcherlookahead- the lookahead stream to read additional linesbuilder- the issue builder to use- Returns:
- a new annotation for the specified pattern
-
isLineInteresting
protected boolean isLineInteresting(String line)
Description copied from class:LookaheadParserReturns whether the specified line is interesting. Each interesting line will be matched by the defined regular expression. Here a parser can implement some fast checks (i.e. string or character comparisons) in order to see if a required condition is met. This default implementation does always returntrue.- Overrides:
isLineInterestingin classLookaheadParser- Parameters:
line- the line to inspect- Returns:
trueif the line should be handed over to the regular expression scanner,falseif the line does not contain a warning.
-
-