Class HoconTokenizer
This class contains methods used to tokenize HOCON (Human-Optimized Config Object Notation) configuration strings.
Inherited Members
Namespace: Akka.Configuration.Hocon
Assembly: Akka.dll
Syntax
public class HoconTokenizer : Tokenizer
Constructors
| Improve this Doc View SourceHoconTokenizer(String)
Initializes a new instance of the HoconTokenizer class.
Declaration
public HoconTokenizer(string text)
Parameters
Type | Name | Description |
---|---|---|
String | text | The string that contains the text to tokenize. |
Methods
| Improve this Doc View SourceIsArrayEnd()
Determines whether the current token matches an ArrayEnd token.
Declaration
public bool IsArrayEnd()
Returns
Type | Description |
---|---|
Boolean |
|
IsArrayStart()
Determines whether the current token matches an ArrayStart token.
Declaration
public bool IsArrayStart()
Returns
Type | Description |
---|---|
Boolean |
|
IsAssignment()
Determines whether the current token matches an Assign token.
Declaration
public bool IsAssignment()
Returns
Type | Description |
---|---|
Boolean |
|
IsComma()
Determines whether the current token matches an Comma token.
Declaration
public bool IsComma()
Returns
Type | Description |
---|---|
Boolean |
|
IsDot()
Determines whether the current token matches an Dot token.
Declaration
public bool IsDot()
Returns
Type | Description |
---|---|
Boolean |
|
IsEndOfObject()
Determines whether the current token matches an ObjectEnd token.
Declaration
public bool IsEndOfObject()
Returns
Type | Description |
---|---|
Boolean |
|
IsInclude()
Determines whether the current token is the start of an include directive.
Declaration
public bool IsInclude()
Returns
Type | Description |
---|---|
Boolean |
|
Exceptions
Type | Condition |
---|---|
FormatException | This exception is thrown if an unknown escape code is encountered. |
IsObjectStart()
Determines whether the current token matches an ObjectStart token.
Declaration
public bool IsObjectStart()
Returns
Type | Description |
---|---|
Boolean |
|
IsSpaceOrTab()
Determines whether the current token is a space or a tab.
Declaration
public bool IsSpaceOrTab()
Returns
Type | Description |
---|---|
Boolean |
|
IsStartOfComment()
Determines whether the current token is the start of a comment.
Declaration
public bool IsStartOfComment()
Returns
Type | Description |
---|---|
Boolean |
|
IsStartOfQuotedText()
Determines whether the current token matches the start of a quoted string.
Declaration
public bool IsStartOfQuotedText()
Returns
Type | Description |
---|---|
Boolean |
|
IsStartOfTripleQuotedText()
Determines whether the current token matches the start of a triple quoted string.
Declaration
public bool IsStartOfTripleQuotedText()
Returns
Type | Description |
---|---|
Boolean |
|
IsStartSimpleValue()
Determines whether the current token is the start of an unquoted string literal.
Declaration
public bool IsStartSimpleValue()
Returns
Type | Description |
---|---|
Boolean |
|
IsSubstitutionStart()
Determines whether the current token is the start of a substitution.
Declaration
public bool IsSubstitutionStart()
Returns
Type | Description |
---|---|
Boolean |
|
IsUnquotedKey()
Determines whether the current token is an unquoted key.
Declaration
public bool IsUnquotedKey()
Returns
Type | Description |
---|---|
Boolean |
|
IsUnquotedKeyStart()
Determines whether the current token is the start of an unquoted key.
Declaration
public bool IsUnquotedKeyStart()
Returns
Type | Description |
---|---|
Boolean |
|
IsWhitespace()
Determines whether the current token is whitespace.
Declaration
public bool IsWhitespace()
Returns
Type | Description |
---|---|
Boolean |
|
IsWhitespaceOrComment()
Determines whether the current token is whitespace or a comment.
Declaration
public bool IsWhitespaceOrComment()
Returns
Type | Description |
---|---|
Boolean |
|
PullArrayEnd()
Retrieves a ArrayEnd token from the tokenizer's current position.
Declaration
public Token PullArrayEnd()
Returns
Type | Description |
---|---|
Token | A ArrayEnd token from the tokenizer's current position. |
PullArrayStart()
Retrieves a ArrayStart token from the tokenizer's current position.
Declaration
public Token PullArrayStart()
Returns
Type | Description |
---|---|
Token | A ArrayStart token from the tokenizer's current position. |
PullAssignment()
Retrieves a Assign token from the tokenizer's current position.
Declaration
public Token PullAssignment()
Returns
Type | Description |
---|---|
Token | A Assign token from the tokenizer's current position. |
PullComma()
Retrieves a Comma token from the tokenizer's current position.
Declaration
public Token PullComma()
Returns
Type | Description |
---|---|
Token | A Comma token from the tokenizer's current position. |
PullComment()
Retrieves a Comment token from the tokenizer's current position.
Declaration
public Token PullComment()
Returns
Type | Description |
---|---|
Token | A Comment token from the tokenizer's current position. |
PullDot()
Retrieves a Dot token from the tokenizer's current position.
Declaration
public Token PullDot()
Returns
Type | Description |
---|---|
Token | A Dot token from the tokenizer's current position. |
PullEndOfObject()
Retrieves a ObjectEnd token from the tokenizer's current position.
Declaration
public Token PullEndOfObject()
Returns
Type | Description |
---|---|
Token | A ObjectEnd token from the tokenizer's current position. |
PullInclude()
TBD
Declaration
public Token PullInclude()
Returns
Type | Description |
---|---|
Token | TBD |
Exceptions
Type | Condition |
---|---|
FormatException | This exception is thrown if an unknown escape code is encountered. |
PullNext()
Retrieves the next token from the string.
Declaration
public Token PullNext()
Returns
Type | Description |
---|---|
Token | The next token contained in the string. |
Exceptions
Type | Condition |
---|---|
FormatException | This exception is thrown if an unknown token or escape code is encountered. |
PullQuotedKey()
Retrieves a quoted Key token from the tokenizer's current position.
Declaration
public Token PullQuotedKey()
Returns
Type | Description |
---|---|
Token | A Key token from the tokenizer's current position. |
Exceptions
Type | Condition |
---|---|
FormatException | This exception is thrown if an unknown escape code is encountered. |
PullQuotedText()
Retrieves a quoted LiteralValue token from the tokenizer's current position.
Declaration
public Token PullQuotedText()
Returns
Type | Description |
---|---|
Token | A LiteralValue token from the tokenizer's current position. |
Exceptions
Type | Condition |
---|---|
FormatException | This exception is thrown if an unknown escape code is encountered. |
PullRestOfLine()
Retrieves the current line from where the current token is located in the string.
Declaration
public string PullRestOfLine()
Returns
Type | Description |
---|---|
String | The current line from where the current token is located. |
PullSimpleValue()
Retrieves the current token as a string literal token.
Declaration
public Token PullSimpleValue()
Returns
Type | Description |
---|---|
Token | A token that contains the string literal value. |
Exceptions
Type | Condition |
---|---|
FormatException | This exception is thrown if the tokenizer cannot find a string literal value from the current token. |
PullSpaceOrTab()
Retrieves the current token, including whitespace and tabs, as a string literal token.
Declaration
public Token PullSpaceOrTab()
Returns
Type | Description |
---|---|
Token | A token that contains the string literal value. |
PullStartOfObject()
Retrieves a ObjectStart token from the tokenizer's current position.
Declaration
public Token PullStartOfObject()
Returns
Type | Description |
---|---|
Token | A ObjectStart token from the tokenizer's current position. |
PullSubstitution()
Retrieves a Substitute token from the tokenizer's current position.
Declaration
public Token PullSubstitution()
Returns
Type | Description |
---|---|
Token | A Substitute token from the tokenizer's current position. |
PullTripleQuotedText()
Retrieves a triple quoted LiteralValue token from the tokenizer's current position.
Declaration
public Token PullTripleQuotedText()
Returns
Type | Description |
---|---|
Token | A LiteralValue token from the tokenizer's current position. |
PullUnquotedKey()
Retrieves an unquoted Key token from the tokenizer's current position.
Declaration
public Token PullUnquotedKey()
Returns
Type | Description |
---|---|
Token | A Key token from the tokenizer's current position. |
PullValue()
Retrieves a value token from the tokenizer's current position.
Declaration
public Token PullValue()
Returns
Type | Description |
---|---|
Token | A value token from the tokenizer's current position. |
Exceptions
Type | Condition |
---|---|
FormatException | This exception is thrown if an unknown token is encountered. Expected values include the following: Null literal, Array, Quoted Text, Unquoted Text, Triple quoted Text, Object or End of array. |
PullWhitespaceAndComments()
Advances the tokenizer to the next non-whitespace, non-comment token.
Declaration
public void PullWhitespaceAndComments()