## org.gjt.sp.jedit.syntax
Class ParserRule

    java.lang.Object
      org.gjt.sp.jedit.syntax.ParserRule

    public class ParserRule

extends java.lang.Object

A parser rule.

Field Summary
`int` `action`
`static int` `ACTION_HINTS`
`static int` `AT_LINE_START`
`static int` `AT_WHITESPACE_END`
`static int` `AT_WORD_START`
`ParserRuleSet` `delegate`
`char[]` `end`
`int` `endPosMatch`
`static int` `EOL_SPAN`
`ParserRule` `escapeRule` escapeRule is the rule-specific sequence used to escape other characters while the rule is in effect.
`static int` `EXCLUDE_MATCH` Deprecated.
`static int` `IS_ESCAPE`
`static int` `MAJOR_ACTIONS`
`static int` `MARK_FOLLOWING`
`static int` `MARK_PREVIOUS`
`static byte` `MATCH_TYPE_CONTEXT`
`static byte` `MATCH_TYPE_RULE`
`byte` `matchType` matchType is the type of the token for the matched region.
`ParserRule` `next` Deprecated. As the linking between rules is not anymore done within the rule but external. See `ParserRuleSet.getRules(Character)`
`static int` `NO_ESCAPE` Deprecated.
`static int` `NO_LINE_BREAK`
`static int` `NO_WORD_BREAK`
`static int` `REGEXP`
`static int` `SEQ`
`static int` `SPAN`
`char[]` `start`
`int` `startPosMatch`
`java.util.regex.Pattern` `startRegexp`
`byte` `token`
`java.lang.String` `upHashChar`
`char[]` `upHashChars`

Method Summary
`static ParserRule` `createEOLSpanRule(int posMatch, java.lang.String seq, ParserRuleSet delegate, byte id, byte matchType)`
`static ParserRule` `createEscapeRule(java.lang.String seq)`
`static ParserRule` `createMarkFollowingRule(int posMatch, java.lang.String seq, byte id, byte matchType)`
`static ParserRule` `createMarkPreviousRule(int posMatch, java.lang.String seq, byte id, byte matchType)`
`static ParserRule` `createRegexpEOLSpanRule(char hashChar, int posMatch, java.lang.String seq, ParserRuleSet delegate, byte id, byte matchType, boolean ignoreCase)` Deprecated. Use `createRegexpEOLSpanRule(String,int,String,ParserRuleSet,byte,byte,boolean)` instead
`static ParserRule` `createRegexpEOLSpanRule(int posMatch, char[] hashChars, java.lang.String seq, ParserRuleSet delegate, byte id, byte matchType, boolean ignoreCase)`
`static ParserRule` `createRegexpEOLSpanRule(java.lang.String hashChar, int posMatch, java.lang.String seq, ParserRuleSet delegate, byte id, byte matchType, boolean ignoreCase)`
`static ParserRule` `createRegexpSequenceRule(char hashChar, int posMatch, java.lang.String seq, ParserRuleSet delegate, byte id, boolean ignoreCase)` Deprecated. Use `createRegexpSequenceRule(String,int,String,ParserRuleSet,byte,boolean)` instead
`static ParserRule` `createRegexpSequenceRule(int posMatch, char[] hashChars, java.lang.String seq, ParserRuleSet delegate, byte id, boolean ignoreCase)`
`static ParserRule` `createRegexpSequenceRule(java.lang.String hashChar, int posMatch, java.lang.String seq, ParserRuleSet delegate, byte id, boolean ignoreCase)`
`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)`
`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)`
`static ParserRule` `createSequenceRule(int posMatch, java.lang.String seq, ParserRuleSet delegate, byte id)`
`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)`
`java.lang.String` `toString()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

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

### EXCLUDE_MATCH

    @Deprecated
    public static final int EXCLUDE_MATCH

  Deprecated.
  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

### NO_ESCAPE

    @Deprecated
    public static final int NO_ESCAPE

  Deprecated.
  See Also:
    Constant Field Values

### REGEXP

    public static final int 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 java.lang.String upHashChar

### 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

### 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

### next

    public ParserRule next

  Deprecated. As the linking between rules is not anymore done within the rule but external. See `ParserRuleSet.getRules(Character)`

Method Detail

### createSequenceRule

    public static final ParserRule createSequenceRule(int posMatch,
                                                      java.lang.String seq,
                                                      ParserRuleSet delegate,
                                                      byte id)

### createRegexpSequenceRule

    public static final ParserRule createRegexpSequenceRule(char hashChar,
                                                            int posMatch,
                                                            java.lang.String seq,
                                                            ParserRuleSet delegate,
                                                            byte id,
                                                            boolean ignoreCase)
                                                     throws java.util.regex.PatternSyntaxException

  Deprecated. Use `createRegexpSequenceRule(String,int,String,ParserRuleSet,byte,boolean)` instead

  Throws:
    `java.util.regex.PatternSyntaxException`

### createRegexpSequenceRule

    public static final 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 final 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 final 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 final 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)
                                                 throws java.util.regex.PatternSyntaxException

  Throws:
    `java.util.regex.PatternSyntaxException`

### createRegexpSpanRule

    public static final 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)
                                                 throws java.util.regex.PatternSyntaxException

  Throws:
    `java.util.regex.PatternSyntaxException`

### createEOLSpanRule

    public static final ParserRule createEOLSpanRule(int posMatch,
                                                     java.lang.String seq,
                                                     ParserRuleSet delegate,
                                                     byte id,
                                                     byte matchType)

### createRegexpEOLSpanRule

    public static final ParserRule createRegexpEOLSpanRule(char hashChar,
                                                           int posMatch,
                                                           java.lang.String seq,
                                                           ParserRuleSet delegate,
                                                           byte id,
                                                           byte matchType,
                                                           boolean ignoreCase)
                                                    throws java.util.regex.PatternSyntaxException

  Deprecated. Use `createRegexpEOLSpanRule(String,int,String,ParserRuleSet,byte,byte,boolean)` instead

  Throws:
    `java.util.regex.PatternSyntaxException`

### createRegexpEOLSpanRule

    public static final 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 final 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 final ParserRule createMarkFollowingRule(int posMatch,
                                                           java.lang.String seq,
                                                           byte id,
                                                           byte matchType)

### createMarkPreviousRule

    public static final ParserRule createMarkPreviousRule(int posMatch,
                                                          java.lang.String seq,
                                                          byte id,
                                                          byte matchType)

### createEscapeRule

    public static final ParserRule createEscapeRule(java.lang.String seq)

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.Object`