Search Results for

    Show / Hide Table of Contents

    Class StreamTokenizerSettings

    This contains the settings that control the behavior of the tokenizer. This is separated from the StreamTokenizer so that common settings are easy to package and keep together.

    Inheritance
    object
    StreamTokenizerSettings
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: RTools_NTS.Util
    Assembly: NetTopologySuite.dll
    Syntax
    public class StreamTokenizerSettings

    Constructors

    | Edit this page View Source

    StreamTokenizerSettings()

    Default constructor.

    Declaration
    public StreamTokenizerSettings()
    | Edit this page View Source

    StreamTokenizerSettings(StreamTokenizerSettings)

    Copy constructor.

    Declaration
    public StreamTokenizerSettings(StreamTokenizerSettings other)
    Parameters
    Type Name Description
    StreamTokenizerSettings other

    Properties

    | Edit this page View Source

    CharTypes

    This is the character type table. Each byte is bitwise encoded with the character attributes, such as whether that character is word or whitespace.

    Declaration
    public byte[] CharTypes { get; }
    Property Value
    Type Description
    byte[]
    | Edit this page View Source

    DoUntermCheck

    Whether or not to check for unterminated quotes and block comments. If true, and one is encoutered, an exception is thrown of the appropriate type.

    Declaration
    public bool DoUntermCheck { get; set; }
    Property Value
    Type Description
    bool
    | Edit this page View Source

    GrabComments

    Whether or not to return comments.

    Declaration
    public bool GrabComments { get; set; }
    Property Value
    Type Description
    bool
    | Edit this page View Source

    GrabEol

    Whether or not to return EolTokens on end of line. Eol tokens will not break up other tokens which can be multi-line. For example block comments and quotes will not be broken by Eol tokens. Therefore the number of Eol tokens does not give you the line count of a stream.

    Declaration
    public bool GrabEol { get; set; }
    Property Value
    Type Description
    bool
    | Edit this page View Source

    GrabWhitespace

    Whether or not to return whitespace tokens. If not, they're ignored.

    Declaration
    public bool GrabWhitespace { get; set; }
    Property Value
    Type Description
    bool
    | Edit this page View Source

    ParseHexNumbers

    Whether or not to parse Hex (0xABCD...) numbers. This setting is based on the character types table, so this setting interacts with character type table manipulation.

    Declaration
    public bool ParseHexNumbers { get; set; }
    Property Value
    Type Description
    bool
    | Edit this page View Source

    ParseNumbers

    Whether or not digits are specified as Digit type in the character table. This setting is based on the character types table, so this setting interacts with character type table manipulation. This setting may become incorrect if you modify the character types table directly.

    Declaration
    public bool ParseNumbers { get; set; }
    Property Value
    Type Description
    bool
    | Edit this page View Source

    SlashSlashComments

    Whether or not to look for // comments

    Declaration
    public bool SlashSlashComments { get; set; }
    Property Value
    Type Description
    bool
    | Edit this page View Source

    SlashStarComments

    Whether or not to look for /* */ block comments.

    Declaration
    public bool SlashStarComments { get; set; }
    Property Value
    Type Description
    bool

    Methods

    | Edit this page View Source

    CharTypeToString(byte)

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

    Declaration
    public string CharTypeToString(byte ctype)
    Parameters
    Type Name Description
    byte ctype

    The character type byte.

    Returns
    Type Description
    string

    The string representation of the type flags.

    | Edit this page View Source

    CommentChar(int)

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

    Declaration
    public void CommentChar(int c)
    Parameters
    Type Name Description
    int c
    | Edit this page View Source

    Copy(StreamTokenizerSettings)

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

    Declaration
    public void Copy(StreamTokenizerSettings other)
    Parameters
    Type Name Description
    StreamTokenizerSettings other
    | Edit this page View Source

    Display()

    Display the state of this object.

    Declaration
    public void Display()
    | Edit this page View Source

    Display(string)

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

    Declaration
    public void Display(string prefix)
    Parameters
    Type Name Description
    string prefix

    The pre-line prefix.

    | Edit this page View Source

    IsCharType(byte, CharTypeBits)

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

    Declaration
    public bool IsCharType(byte ctype, CharTypeBits type)
    Parameters
    Type Name Description
    byte ctype

    The char type byte.

    CharTypeBits type

    The CharTypeBits entry to compare to.

    Returns
    Type Description
    bool

    bool - true or false

    | Edit this page View Source

    IsCharType(char, CharTypeBits)

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

    Declaration
    public bool IsCharType(char c, CharTypeBits type)
    Parameters
    Type Name Description
    char c

    The character.

    CharTypeBits type

    The CharTypeBits entry to compare to.

    Returns
    Type Description
    bool

    bool - true or false

    | Edit this page View Source

    IsCharType(int, CharTypeBits)

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

    Declaration
    public bool IsCharType(int c, CharTypeBits type)
    Parameters
    Type Name Description
    int c

    The character.

    CharTypeBits type

    The CharTypeBits entry to compare to.

    Returns
    Type Description
    bool

    bool - true or false

    | Edit this page View Source

    OrdinaryChar(int)

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

    Declaration
    public void OrdinaryChar(int c)
    Parameters
    Type Name Description
    int c
    | Edit this page View Source

    OrdinaryChars(int, int)

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

    Declaration
    public void OrdinaryChars(int startChar, int endChar)
    Parameters
    Type Name Description
    int startChar
    int endChar
    | Edit this page View Source

    QuoteChar(int)

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

    Declaration
    public void QuoteChar(int c)
    Parameters
    Type Name Description
    int c
    | Edit this page View Source

    ResetCharTypeTable()

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

    Declaration
    public void ResetCharTypeTable()
    | Edit this page View Source

    SetDefaults()

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

    Declaration
    public bool SetDefaults()
    Returns
    Type Description
    bool

    bool - true for success.

    | Edit this page View Source

    SetupForCodeParse()

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

    Declaration
    public bool SetupForCodeParse()
    Returns
    Type Description
    bool
    | Edit this page View Source

    WhitespaceChar(int)

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

    Declaration
    public void WhitespaceChar(int c)
    Parameters
    Type Name Description
    int c

    The character.

    | Edit this page View Source

    WhitespaceChars(int, int)

    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.

    Declaration
    public void WhitespaceChars(int startChar, int endChar)
    Parameters
    Type Name Description
    int startChar

    First character.

    int endChar

    Last character.

    | Edit this page View Source

    WordChar(int)

    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.

    Declaration
    public void WordChar(int c)
    Parameters
    Type Name Description
    int c

    The character.

    | Edit this page View Source

    WordChars(int, int)

    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.

    Declaration
    public void WordChars(int startChar, int endChar)
    Parameters
    Type Name Description
    int startChar

    First character.

    int endChar

    Last character.

    | Edit this page View Source

    WordChars(string)

    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.

    Declaration
    public void WordChars(string s)
    Parameters
    Type Name Description
    string s
    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX