C# Class RTools.Util.StreamTokenizerSettings

Mostra file Open project: PaulMineau/AIMA.Net Class Usage Examples

Public Methods

Method Description
CharTypeToString ( byte ctype ) : string

Return a string representation of a character type setting. Since the type setting is bitwise encoded, a character can have more than one type.

CommentChar ( int c ) : void

Specify that a particular character is a comment-starting character. Character table type manipulation method.

Copy ( StreamTokenizerSettings other ) : void

Sets this object to be the same as the specified object. Note that some settings which are entirely embodied by the character type table.

Display ( ) : void

Display the state of this object.

Display ( string prefix ) : void

Display the state of this object, with a per-line prefix.

IsCharType ( byte ctype, CharTypeBits type ) : bool

Check whether the specified char type byte has a particular type flag set.

IsCharType ( char c, CharTypeBits type ) : bool

Check whether the specified char has a particular type flag set.

IsCharType ( int c, CharTypeBits type ) : bool

Check whether the specified char has a particular type flag set.

OrdinaryChar ( int c ) : void

Remove other type settings from a character. Character table type manipulation method.

OrdinaryChars ( int startChar, int endChar ) : void

Remove other type settings from a range of characters. Character table type manipulation method.

QuoteChar ( int c ) : void

Specify that a particular character is a quote character. Character table type manipulation method.

ResetCharTypeTable ( ) : void

Clear the character type settings. This leaves them unset, as opposed to the default. Use SetDefaults() for default settings.

SetDefaults ( ) : bool

Setup default parse behavior. This resets to same behavior as on construction.

SetupForCodeParse ( ) : bool

Apply settings which are commonly used for code parsing C-style code, including C++, C#, and Java.

StreamTokenizerSettings ( ) : System

Default constructor.

StreamTokenizerSettings ( StreamTokenizerSettings other ) : System

Copy constructor.

WhitespaceChar ( int c ) : void

Specify that a character is a whitespace character. Character table type manipulation method. This type is exclusive with other types.

WhitespaceChars ( int startChar, int endChar ) : void

Specify that a range of characters are whitespace characters. Character table type manipulation method. This adds the characteristic to the char(s), rather than overwriting other characteristics.

WordChar ( int c ) : void

Specify that a particular character is a word character. Character table type manipulation method. This adds the type to the char(s), rather than overwriting other types.

WordChars ( int startChar, int endChar ) : void

Specify that a range of characters are word characters. Character table type manipulation method. This adds the type to the char(s), rather than overwriting other types.

WordChars ( string s ) : void

Specify that a string of characters are word characters. Character table type manipulation method. This adds the type to the char(s), rather than overwriting other types.

Method Details

CharTypeToString() public method

Return a string representation of a character type setting. Since the type setting is bitwise encoded, a character can have more than one type.
public CharTypeToString ( byte ctype ) : string
ctype byte The character type byte.
return string

CommentChar() public method

Specify that a particular character is a comment-starting character. Character table type manipulation method.
public CommentChar ( int c ) : void
c int
return void

Copy() public method

Sets this object to be the same as the specified object. Note that some settings which are entirely embodied by the character type table.
public Copy ( StreamTokenizerSettings other ) : void
other StreamTokenizerSettings
return void

Display() public method

Display the state of this object.
public Display ( ) : void
return void

Display() public method

Display the state of this object, with a per-line prefix.
public Display ( string prefix ) : void
prefix string The pre-line prefix.
return void

IsCharType() public method

Check whether the specified char type byte has a particular type flag set.
public IsCharType ( byte ctype, CharTypeBits type ) : bool
ctype byte The char type byte.
type CharTypeBits The CharTypeBits entry to compare to.
return bool

IsCharType() public method

Check whether the specified char has a particular type flag set.
public IsCharType ( char c, CharTypeBits type ) : bool
c char The character.
type CharTypeBits The CharTypeBits entry to compare to.
return bool

IsCharType() public method

Check whether the specified char has a particular type flag set.
public IsCharType ( int c, CharTypeBits type ) : bool
c int The character.
type CharTypeBits The CharTypeBits entry to compare to.
return bool

OrdinaryChar() public method

Remove other type settings from a character. Character table type manipulation method.
public OrdinaryChar ( int c ) : void
c int
return void

OrdinaryChars() public method

Remove other type settings from a range of characters. Character table type manipulation method.
public OrdinaryChars ( int startChar, int endChar ) : void
startChar int
endChar int
return void

QuoteChar() public method

Specify that a particular character is a quote character. Character table type manipulation method.
public QuoteChar ( int c ) : void
c int
return void

ResetCharTypeTable() public method

Clear the character type settings. This leaves them unset, as opposed to the default. Use SetDefaults() for default settings.
public ResetCharTypeTable ( ) : void
return void

SetDefaults() public method

Setup default parse behavior. This resets to same behavior as on construction.
public SetDefaults ( ) : bool
return bool

SetupForCodeParse() public method

Apply settings which are commonly used for code parsing C-style code, including C++, C#, and Java.
public SetupForCodeParse ( ) : bool
return bool

StreamTokenizerSettings() public method

Default constructor.
public StreamTokenizerSettings ( ) : System
return System

StreamTokenizerSettings() public method

Copy constructor.
public StreamTokenizerSettings ( StreamTokenizerSettings other ) : System
other StreamTokenizerSettings
return System

WhitespaceChar() public method

Specify that a character is a whitespace character. Character table type manipulation method. This type is exclusive with other types.
public WhitespaceChar ( int c ) : void
c int The character.
return void

WhitespaceChars() public method

Specify that a range of characters are whitespace characters. Character table type manipulation method. This adds the characteristic to the char(s), rather than overwriting other characteristics.
public WhitespaceChars ( int startChar, int endChar ) : void
startChar int First character.
endChar int Last character.
return void

WordChar() public method

Specify that a particular character is a word character. Character table type manipulation method. This adds the type to the char(s), rather than overwriting other types.
public WordChar ( int c ) : void
c int The character.
return void

WordChars() public method

Specify that a range of characters are word characters. Character table type manipulation method. This adds the type to the char(s), rather than overwriting other types.
public WordChars ( int startChar, int endChar ) : void
startChar int First character.
endChar int Last character.
return void

WordChars() public method

Specify that a string of characters are word characters. Character table type manipulation method. This adds the type to the char(s), rather than overwriting other types.
public WordChars ( string s ) : void
s string
return void