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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addRule
(ParserRule parserRule) void
addRuleSet
(ParserRuleSet ruleset) Adds all rules contained in the given ruleset.byte
boolean
boolean
getName()
int
getRules
(char key) static ParserRuleSet
getStandardRuleSet
(byte id) Returns a parser rule set that highlights everything with the specified token type.int
Returns the number of chars that can be read before the rule parsing stops.boolean
Returns if this is a built-in ruleset.void
Resolves all rulesets added withaddRuleSet(ParserRuleSet)
.void
setDefault
(byte def) void
setDigitRegexp
(Pattern digitRE) void
setEscapeRule
(ParserRule escapeRule) void
setHighlightDigits
(boolean highlightDigits) void
setIgnoreCase
(boolean b) void
void
setNoWordSep
(String noWordSep) void
setProperties
(Hashtable<String, String> props) void
setTerminateChar
(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
-