Package org.gjt.sp.jedit.syntax
Class ParserRule
- java.lang.Object
-
- org.gjt.sp.jedit.syntax.ParserRule
-
public class ParserRule extends java.lang.ObjectA parser rule.
-
-
Field Summary
Fields Modifier and Type Field Description intactionstatic intACTION_HINTSstatic intAT_LINE_STARTstatic intAT_WHITESPACE_ENDstatic intAT_WORD_STARTParserRuleSetdelegatechar[]endstatic intEND_REGEXPintendPosMatchjava.util.regex.PatternendRegexpstatic intEOL_SPANParserRuleescapeRuleescapeRule is the rule-specific sequence used to escape other characters while the rule is in effect.static intIS_ESCAPEstatic intMAJOR_ACTIONSstatic intMARK_FOLLOWINGstatic intMARK_PREVIOUSstatic byteMATCH_TYPE_CONTEXTstatic byteMATCH_TYPE_RULEbytematchTypematchType is the type of the token for the matched region.static intNO_LINE_BREAKstatic intNO_WORD_BREAKstatic intREGEXPstatic intSEQstatic intSPANchar[]startintstartPosMatchjava.util.regex.PatternstartRegexpbytetokenchar[]upHashCharThe upHashChar should be a String but it is stored in an array making iterations much fasterchar[]upHashChars
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ParserRulecreateEOLSpanRule(int posMatch, java.lang.String seq, ParserRuleSet delegate, byte id, byte matchType)static ParserRulecreateEscapeRule(java.lang.String seq)static ParserRulecreateMarkFollowingRule(int posMatch, java.lang.String seq, byte id, byte matchType)static ParserRulecreateMarkPreviousRule(int posMatch, java.lang.String seq, byte id, byte matchType)static ParserRulecreateRegexpEOLSpanRule(int posMatch, char[] hashChars, java.lang.String seq, ParserRuleSet delegate, byte id, byte matchType, boolean ignoreCase)static ParserRulecreateRegexpEOLSpanRule(java.lang.String hashChar, int posMatch, java.lang.String seq, ParserRuleSet delegate, byte id, byte matchType, boolean ignoreCase)static ParserRulecreateRegexpSequenceRule(int posMatch, char[] hashChars, java.lang.String seq, ParserRuleSet delegate, byte id, boolean ignoreCase)static ParserRulecreateRegexpSequenceRule(java.lang.String hashChar, int posMatch, java.lang.String seq, ParserRuleSet delegate, byte id, boolean ignoreCase)static ParserRulecreateRegexpSpanRule(int startPosMatch, char[] hashChars, java.lang.String start, int endPosMatch, java.lang.String end, ParserRuleSet delegate, byte id, byte matchType, boolean noLineBreak, boolean noWordBreak, boolean ignoreCase, java.lang.String escape, boolean endRegexp)static ParserRulecreateRegexpSpanRule(java.lang.String hashChar, int startPosMatch, java.lang.String start, int endPosMatch, java.lang.String end, ParserRuleSet delegate, byte id, byte matchType, boolean noLineBreak, boolean noWordBreak, boolean ignoreCase, java.lang.String escape, boolean endRegexp)static ParserRulecreateSequenceRule(int posMatch, java.lang.String seq, ParserRuleSet delegate, byte id)static ParserRulecreateSpanRule(int startPosMatch, java.lang.String start, int endPosMatch, java.lang.String end, ParserRuleSet delegate, byte id, byte matchType, boolean noLineBreak, boolean noWordBreak, java.lang.String escape)java.lang.StringtoString()
-
-
-
Field Detail
-
MAJOR_ACTIONS
public static final int MAJOR_ACTIONS
- See Also:
- Constant Field Values
-
SEQ
public static final int SEQ
- See Also:
- Constant Field Values
-
SPAN
public static final int SPAN
- See Also:
- Constant Field Values
-
MARK_PREVIOUS
public static final int MARK_PREVIOUS
- See Also:
- Constant Field Values
-
MARK_FOLLOWING
public static final int MARK_FOLLOWING
- See Also:
- Constant Field Values
-
EOL_SPAN
public static final int EOL_SPAN
- See Also:
- Constant Field Values
-
ACTION_HINTS
public static final int ACTION_HINTS
- See Also:
- Constant Field Values
-
NO_LINE_BREAK
public static final int NO_LINE_BREAK
- See Also:
- Constant Field Values
-
NO_WORD_BREAK
public static final int NO_WORD_BREAK
- See Also:
- Constant Field Values
-
IS_ESCAPE
public static final int IS_ESCAPE
- See Also:
- Constant Field Values
-
REGEXP
public static final int REGEXP
- See Also:
- Constant Field Values
-
END_REGEXP
public static final int END_REGEXP
- See Also:
- Constant Field Values
-
MATCH_TYPE_CONTEXT
public static final byte MATCH_TYPE_CONTEXT
- See Also:
- Constant Field Values
-
MATCH_TYPE_RULE
public static final byte MATCH_TYPE_RULE
- See Also:
- Constant Field Values
-
AT_LINE_START
public static final int AT_LINE_START
- See Also:
- Constant Field Values
-
AT_WHITESPACE_END
public static final int AT_WHITESPACE_END
- See Also:
- Constant Field Values
-
AT_WORD_START
public static final int AT_WORD_START
- See Also:
- Constant Field Values
-
upHashChar
public final char[] upHashChar
The 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
public final java.util.regex.Pattern startRegexp
-
endPosMatch
public final int endPosMatch
-
end
public final char[] end
-
endRegexp
public final java.util.regex.Pattern endRegexp
-
action
public final int action
-
token
public final byte token
-
matchType
public final byte matchType
matchType 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
public final ParserRule 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
public ParserRuleSet delegate
-
-
Method Detail
-
createSequenceRule
public static ParserRule createSequenceRule(int posMatch, java.lang.String seq, ParserRuleSet delegate, byte id)
-
createRegexpSequenceRule
public static ParserRule createRegexpSequenceRule(java.lang.String hashChar, int posMatch, java.lang.String seq, ParserRuleSet delegate, byte id, boolean ignoreCase) throws java.util.regex.PatternSyntaxException
- Throws:
java.util.regex.PatternSyntaxException
-
createRegexpSequenceRule
public static ParserRule createRegexpSequenceRule(int posMatch, char[] hashChars, java.lang.String seq, ParserRuleSet delegate, byte id, boolean ignoreCase) throws java.util.regex.PatternSyntaxException
- Throws:
java.util.regex.PatternSyntaxException
-
createSpanRule
public static ParserRule createSpanRule(int startPosMatch, java.lang.String start, int endPosMatch, java.lang.String end, ParserRuleSet delegate, byte id, byte matchType, boolean noLineBreak, boolean noWordBreak, java.lang.String escape)
-
createRegexpSpanRule
public static ParserRule createRegexpSpanRule(java.lang.String hashChar, int startPosMatch, java.lang.String start, int endPosMatch, java.lang.String end, ParserRuleSet delegate, byte id, byte matchType, boolean noLineBreak, boolean noWordBreak, boolean ignoreCase, java.lang.String escape, boolean endRegexp) throws java.util.regex.PatternSyntaxException
- Throws:
java.util.regex.PatternSyntaxException
-
createRegexpSpanRule
public static ParserRule createRegexpSpanRule(int startPosMatch, char[] hashChars, java.lang.String start, int endPosMatch, java.lang.String end, ParserRuleSet delegate, byte id, byte matchType, boolean noLineBreak, boolean noWordBreak, boolean ignoreCase, java.lang.String escape, boolean endRegexp) throws java.util.regex.PatternSyntaxException
- Throws:
java.util.regex.PatternSyntaxException
-
createEOLSpanRule
public static ParserRule createEOLSpanRule(int posMatch, java.lang.String seq, ParserRuleSet delegate, byte id, byte matchType)
-
createRegexpEOLSpanRule
public static ParserRule createRegexpEOLSpanRule(java.lang.String hashChar, int posMatch, java.lang.String seq, ParserRuleSet delegate, byte id, byte matchType, boolean ignoreCase) throws java.util.regex.PatternSyntaxException
- Throws:
java.util.regex.PatternSyntaxException
-
createRegexpEOLSpanRule
public static ParserRule createRegexpEOLSpanRule(int posMatch, char[] hashChars, java.lang.String seq, ParserRuleSet delegate, byte id, byte matchType, boolean ignoreCase) throws java.util.regex.PatternSyntaxException
- Throws:
java.util.regex.PatternSyntaxException
-
createMarkFollowingRule
public static ParserRule createMarkFollowingRule(int posMatch, java.lang.String seq, byte id, byte matchType)
-
createMarkPreviousRule
public static ParserRule createMarkPreviousRule(int posMatch, java.lang.String seq, byte id, byte matchType)
-
createEscapeRule
public static ParserRule createEscapeRule(java.lang.String seq)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-