Module jEdit

Class ParserRuleSet

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

public class ParserRuleSet extends Object
A set of parser rules.
Version:
$Id: ParserRuleSet.java 25293 2020-04-26 09:05:14Z kpouer $
Author:
mike dillon
  • Constructor Details

    • ParserRuleSet

      public ParserRuleSet(String modeName, String setName)
  • Method Details

    • getStandardRuleSet

      public static ParserRuleSet getStandardRuleSet(byte id)
      Returns a parser rule set that highlights everything with the specified token type.
      Parameters:
      id - The token type
    • getModeName

      public String getModeName()
    • getSetName

      public String getSetName()
    • getName

      public String getName()
    • getProperties

      public Hashtable<String,String> getProperties()
    • setProperties

      public void setProperties(Hashtable<String,String> props)
    • resolveImports

      public void resolveImports()
      Resolves all rulesets added with addRuleSet(ParserRuleSet).
      Since:
      jEdit 4.2pre3
    • addRuleSet

      public void addRuleSet(ParserRuleSet ruleset)
      Adds all rules contained in the given ruleset.
      Parameters:
      ruleset - The ruleset
      Since:
      jEdit 4.2pre3
    • addRule

      public void addRule(ParserRule parserRule)
    • getRules

      @Nonnull public List<ParserRule> getRules(char key)
    • getRuleCount

      public int getRuleCount()
    • getTerminateChar

      public int getTerminateChar()
      Returns the number of chars that can be read before the rule parsing stops.
      Returns:
      a number of chars or -1 (default value) if there is no limit
    • setTerminateChar

      public void setTerminateChar(int atChar)
    • getIgnoreCase

      public boolean getIgnoreCase()
    • setIgnoreCase

      public void setIgnoreCase(boolean b)
    • getKeywords

      public KeywordMap getKeywords()
    • setKeywords

      public void setKeywords(KeywordMap km)
    • getHighlightDigits

      public boolean getHighlightDigits()
    • setHighlightDigits

      public void setHighlightDigits(boolean highlightDigits)
    • getDigitRegexp

      public Pattern getDigitRegexp()
    • setDigitRegexp

      public void setDigitRegexp(Pattern digitRE)
    • getEscapeRule

      public ParserRule getEscapeRule()
    • setEscapeRule

      public void setEscapeRule(ParserRule escapeRule)
    • getDefault

      public byte getDefault()
    • setDefault

      public void setDefault(byte def)
    • getNoWordSep

      public String getNoWordSep()
    • setNoWordSep

      public void setNoWordSep(String noWordSep)
    • isBuiltIn

      public boolean isBuiltIn()
      Returns if this is a built-in ruleset.
      Since:
      jEdit 4.2pre1
    • toString

      public String toString()
      Overrides:
      toString in class Object