java.lang.Object
org.gjt.sp.jedit.syntax.ParserRuleSet
A set of parser rules.
- Version:
- $Id: ParserRuleSet.java 25293 2020-04-26 09:05:14Z kpouer $
- Author:
- mike dillon
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddRule(ParserRule parserRule) voidaddRuleSet(ParserRuleSet ruleset) Adds all rules contained in the given ruleset.bytebooleanbooleangetName()intgetRules(char key) static ParserRuleSetgetStandardRuleSet(byte id) Returns a parser rule set that highlights everything with the specified token type.intReturns the number of chars that can be read before the rule parsing stops.booleanReturns if this is a built-in ruleset.voidResolves all rulesets added withaddRuleSet(ParserRuleSet).voidsetDefault(byte def) voidsetDigitRegexp(Pattern digitRE) voidsetEscapeRule(ParserRule escapeRule) voidsetHighlightDigits(boolean highlightDigits) voidsetIgnoreCase(boolean b) voidvoidsetNoWordSep(String noWordSep) voidsetProperties(Hashtable<String, String> props) voidsetTerminateChar(int atChar) toString()
-
Constructor Details
-
ParserRuleSet
-
-
Method Details
-
getStandardRuleSet
Returns a parser rule set that highlights everything with the specified token type.- Parameters:
id- The token type
-
getModeName
-
getSetName
-
getName
-
getProperties
-
setProperties
-
resolveImports
public void resolveImports()Resolves all rulesets added withaddRuleSet(ParserRuleSet).- Since:
- jEdit 4.2pre3
-
addRuleSet
Adds all rules contained in the given ruleset.- Parameters:
ruleset- The ruleset- Since:
- jEdit 4.2pre3
-
addRule
-
getRules
-
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
-
setKeywords
-
getHighlightDigits
public boolean getHighlightDigits() -
setHighlightDigits
public void setHighlightDigits(boolean highlightDigits) -
getDigitRegexp
-
setDigitRegexp
-
getEscapeRule
-
setEscapeRule
-
getDefault
public byte getDefault() -
setDefault
public void setDefault(byte def) -
getNoWordSep
-
setNoWordSep
-
isBuiltIn
public boolean isBuiltIn()Returns if this is a built-in ruleset.- Since:
- jEdit 4.2pre1
-
toString
-