java.lang.Object
org.gjt.sp.jedit.syntax.ParserRule
A parser rule.
- Version:
- $Id: ParserRule.java 25244 2020-04-15 15:14:49Z kpouer $
- Author:
- mike dillon, Slava Pestov
-
Field Summary
Modifier and TypeFieldDescriptionfinal int
static final int
static final int
static final int
static final int
final char[]
static final int
final int
final Pattern
static final int
final ParserRule
escapeRule is the rule-specific sequence used to escape other characters while the rule is in effect.static final int
static final int
static final int
static final int
static final byte
static final byte
final byte
matchType is the type of the token for the matched region.static final int
static final int
static final int
static final int
static final int
final char[]
final int
final Pattern
final byte
final char[]
The upHashChar should be a String but it is stored in an array making iterations much fasterfinal char[]
-
Method Summary
Modifier and TypeMethodDescriptionstatic ParserRule
createEOLSpanRule
(int posMatch, String seq, ParserRuleSet delegate, byte id, byte matchType) static ParserRule
createEscapeRule
(String seq) static ParserRule
createMarkFollowingRule
(int posMatch, String seq, byte id, byte matchType) static ParserRule
createMarkPreviousRule
(int posMatch, String seq, byte id, byte matchType) static ParserRule
createRegexpEOLSpanRule
(int posMatch, char[] hashChars, String seq, ParserRuleSet delegate, byte id, byte matchType, boolean ignoreCase) static ParserRule
createRegexpEOLSpanRule
(String hashChar, int posMatch, String seq, ParserRuleSet delegate, byte id, byte matchType, boolean ignoreCase) static ParserRule
createRegexpSequenceRule
(int posMatch, char[] hashChars, String seq, ParserRuleSet delegate, byte id, boolean ignoreCase) static ParserRule
createRegexpSequenceRule
(String hashChar, int posMatch, String seq, ParserRuleSet delegate, byte id, boolean ignoreCase) static ParserRule
createRegexpSpanRule
(int startPosMatch, char[] hashChars, String start, int endPosMatch, String end, ParserRuleSet delegate, byte id, byte matchType, boolean noLineBreak, boolean noWordBreak, boolean ignoreCase, String escape, boolean endRegexp) static ParserRule
createRegexpSpanRule
(String hashChar, int startPosMatch, String start, int endPosMatch, String end, ParserRuleSet delegate, byte id, byte matchType, boolean noLineBreak, boolean noWordBreak, boolean ignoreCase, String escape, boolean endRegexp) static ParserRule
createSequenceRule
(int posMatch, String seq, ParserRuleSet delegate, byte id) static ParserRule
createSpanRule
(int startPosMatch, String start, int endPosMatch, String end, ParserRuleSet delegate, byte id, byte matchType, boolean noLineBreak, boolean noWordBreak, String escape) toString()
-
Field Details
-
MAJOR_ACTIONS
public static final int MAJOR_ACTIONS- See Also:
-
SEQ
public static final int SEQ- See Also:
-
SPAN
public static final int SPAN- See Also:
-
MARK_PREVIOUS
public static final int MARK_PREVIOUS- See Also:
-
MARK_FOLLOWING
public static final int MARK_FOLLOWING- See Also:
-
EOL_SPAN
public static final int EOL_SPAN- See Also:
-
ACTION_HINTS
public static final int ACTION_HINTS- See Also:
-
NO_LINE_BREAK
public static final int NO_LINE_BREAK- See Also:
-
NO_WORD_BREAK
public static final int NO_WORD_BREAK- See Also:
-
IS_ESCAPE
public static final int IS_ESCAPE- See Also:
-
REGEXP
public static final int REGEXP- See Also:
-
END_REGEXP
public static final int END_REGEXP- See Also:
-
MATCH_TYPE_CONTEXT
public static final byte MATCH_TYPE_CONTEXT- See Also:
-
MATCH_TYPE_RULE
public static final byte MATCH_TYPE_RULE- See Also:
-
AT_LINE_START
public static final int AT_LINE_START- See Also:
-
AT_WHITESPACE_END
public static final int AT_WHITESPACE_END- See Also:
-
AT_WORD_START
public static final int AT_WORD_START- See Also:
-
upHashChar
public final char[] upHashCharThe upHashChar should be a String but it is stored in an array making iterations much faster -
upHashChars
public final char[] upHashChars -
startPosMatch
public final int startPosMatch -
start
public final char[] start -
startRegexp
-
endPosMatch
public final int endPosMatch -
end
public final char[] end -
endRegexp
-
action
public final int action -
token
public final byte token -
matchType
public final byte matchTypematchType is the type of the token for the matched region. Special values are: MATCH_TYPE_CONTEXT = default token for the context, MATCH_TYPE_RULE = same token as the rule itself.- Since:
- jEdit 4.3pre10
-
escapeRule
escapeRule is the rule-specific sequence used to escape other characters while the rule is in effect. If this character is non-zero, the character following the escape char will be skipped during parsing, and highlighted with the rule's token.- Since:
- jEdit 4.3pre12
-
delegate
-
-
Method Details
-
createSequenceRule
public static ParserRule createSequenceRule(int posMatch, String seq, ParserRuleSet delegate, byte id) -
createRegexpSequenceRule
public static ParserRule createRegexpSequenceRule(String hashChar, int posMatch, String seq, ParserRuleSet delegate, byte id, boolean ignoreCase) throws PatternSyntaxException - Throws:
PatternSyntaxException
-
createRegexpSequenceRule
public static ParserRule createRegexpSequenceRule(int posMatch, char[] hashChars, String seq, ParserRuleSet delegate, byte id, boolean ignoreCase) throws PatternSyntaxException - Throws:
PatternSyntaxException
-
createSpanRule
public static ParserRule createSpanRule(int startPosMatch, String start, int endPosMatch, String end, ParserRuleSet delegate, byte id, byte matchType, boolean noLineBreak, boolean noWordBreak, String escape) -
createRegexpSpanRule
public static ParserRule createRegexpSpanRule(String hashChar, int startPosMatch, String start, int endPosMatch, String end, ParserRuleSet delegate, byte id, byte matchType, boolean noLineBreak, boolean noWordBreak, boolean ignoreCase, String escape, boolean endRegexp) throws PatternSyntaxException - Throws:
PatternSyntaxException
-
createRegexpSpanRule
public static ParserRule createRegexpSpanRule(int startPosMatch, char[] hashChars, String start, int endPosMatch, String end, ParserRuleSet delegate, byte id, byte matchType, boolean noLineBreak, boolean noWordBreak, boolean ignoreCase, String escape, boolean endRegexp) throws PatternSyntaxException - Throws:
PatternSyntaxException
-
createEOLSpanRule
public static ParserRule createEOLSpanRule(int posMatch, String seq, ParserRuleSet delegate, byte id, byte matchType) -
createRegexpEOLSpanRule
public static ParserRule createRegexpEOLSpanRule(String hashChar, int posMatch, String seq, ParserRuleSet delegate, byte id, byte matchType, boolean ignoreCase) throws PatternSyntaxException - Throws:
PatternSyntaxException
-
createRegexpEOLSpanRule
public static ParserRule createRegexpEOLSpanRule(int posMatch, char[] hashChars, String seq, ParserRuleSet delegate, byte id, byte matchType, boolean ignoreCase) throws PatternSyntaxException - Throws:
PatternSyntaxException
-
createMarkFollowingRule
-
createMarkPreviousRule
-
createEscapeRule
-
toString
-