Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.gjt.sp.jedit.syntax
Class ParserRuleSet  view ParserRuleSet download ParserRuleSet.java

java.lang.Object
  extended byorg.gjt.sp.jedit.syntax.ParserRuleSet

public class ParserRuleSet
extends java.lang.Object

A set of parser rules.

Version:
$Id: ParserRuleSet.java,v 1.23 2003/06/05 00:01:49 spestov Exp $

Field Summary
private  java.lang.String _noWordSep
           
private  boolean builtIn
           
private  byte defaultToken
           
private  gnu.regexp.RE digitRE
           
private  ParserRule escapeRule
           
private  boolean highlightDigits
           
private  boolean ignoreCase
           
private  java.util.LinkedList imports
           
private  KeywordMap keywords
           
private  java.lang.String modeName
           
private  java.lang.String noWordSep
           
private  java.util.Hashtable props
           
private static int RULE_BUCKET_COUNT
           
private  int ruleCount
           
private  ParserRule[] ruleMapFirst
           
private  ParserRule[] ruleMapLast
           
private  java.lang.String setName
           
private static ParserRuleSet[] standard
           
private  int terminateChar
           
 
Constructor Summary
ParserRuleSet(java.lang.String modeName, java.lang.String setName)
           
 
Method Summary
 void addRule(ParserRule r)
           
 void addRuleSet(ParserRuleSet ruleset)
          Adds all rules contained in the given ruleset.
 byte getDefault()
           
 gnu.regexp.RE getDigitRegexp()
           
 ParserRule getEscapeRule()
           
 boolean getHighlightDigits()
           
 boolean getIgnoreCase()
           
 KeywordMap getKeywords()
           
 java.lang.String getModeName()
           
 java.lang.String getName()
           
 java.lang.String getNoWordSep()
           
 java.util.Hashtable getProperties()
           
 int getRuleCount()
           
 ParserRule getRules(char ch)
           
 java.lang.String getSetName()
           
static ParserRuleSet getStandardRuleSet(byte id)
          Returns a parser rule set that highlights everything with the specified token type.
 int getTerminateChar()
           
 boolean isBuiltIn()
          Returns if this is a built-in ruleset.
 void resolveImports()
          Resolves all rulesets added with addRuleSet(ParserRuleSet) 55 .
 void setDefault(byte def)
           
 void setDigitRegexp(gnu.regexp.RE digitRE)
           
 void setEscapeRule(ParserRule escapeRule)
           
 void setHighlightDigits(boolean highlightDigits)
           
 void setIgnoreCase(boolean b)
           
 void setKeywords(KeywordMap km)
           
 void setNoWordSep(java.lang.String noWordSep)
           
 void setProperties(java.util.Hashtable props)
           
 void setTerminateChar(int atChar)
           
 java.lang.String toString()
          Convert this Object to a human-readable String.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

standard

private static ParserRuleSet[] standard

RULE_BUCKET_COUNT

private static final int RULE_BUCKET_COUNT
See Also:
Constant Field Values

modeName

private java.lang.String modeName

setName

private java.lang.String setName

props

private java.util.Hashtable props

keywords

private KeywordMap keywords

ruleCount

private int ruleCount

ruleMapFirst

private ParserRule[] ruleMapFirst

ruleMapLast

private ParserRule[] ruleMapLast

imports

private java.util.LinkedList imports

terminateChar

private int terminateChar

ignoreCase

private boolean ignoreCase

defaultToken

private byte defaultToken

escapeRule

private ParserRule escapeRule

highlightDigits

private boolean highlightDigits

digitRE

private gnu.regexp.RE digitRE

_noWordSep

private java.lang.String _noWordSep

noWordSep

private java.lang.String noWordSep

builtIn

private boolean builtIn
Constructor Detail

ParserRuleSet

public ParserRuleSet(java.lang.String modeName,
                     java.lang.String setName)
Method Detail

getStandardRuleSet

public static ParserRuleSet getStandardRuleSet(byte id)
Returns a parser rule set that highlights everything with the specified token type.


getModeName

public java.lang.String getModeName()

getSetName

public java.lang.String getSetName()

getName

public java.lang.String getName()

getProperties

public java.util.Hashtable getProperties()

setProperties

public void setProperties(java.util.Hashtable props)

resolveImports

public void resolveImports()
Resolves all rulesets added with addRuleSet(ParserRuleSet) 55 .

Since:
jEdit 4.2pre3

addRuleSet

public void addRuleSet(ParserRuleSet ruleset)
Adds all rules contained in the given ruleset.

Since:
jEdit 4.2pre3

addRule

public void addRule(ParserRule r)

getRules

public ParserRule getRules(char ch)

getRuleCount

public int getRuleCount()

getTerminateChar

public int getTerminateChar()

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 gnu.regexp.RE getDigitRegexp()

setDigitRegexp

public void setDigitRegexp(gnu.regexp.RE digitRE)

getEscapeRule

public ParserRule getEscapeRule()

setEscapeRule

public void setEscapeRule(ParserRule escapeRule)

getDefault

public byte getDefault()

setDefault

public void setDefault(byte def)

getNoWordSep

public java.lang.String getNoWordSep()

setNoWordSep

public void setNoWordSep(java.lang.String noWordSep)

isBuiltIn

public boolean isBuiltIn()
Returns if this is a built-in ruleset.

Since:
jEdit 4.2pre1

toString

public java.lang.String toString()
Description copied from class: java.lang.Object
Convert this Object to a human-readable String. There are no limits placed on how long this String should be or what it should contain. We suggest you make it as intuitive as possible to be able to place it into System.out.println() 55 and such.

It is typical, but not required, to ensure that this method never completes abruptly with a java.lang.RuntimeException.

This method will be called when performing string concatenation with this object. If the result is null, string concatenation will instead use "null".

The default implementation returns getClass().getName() + "@" + Integer.toHexString(hashCode()).