|
Grammatica 1.5 Documentation | |||||||
| FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
System.Object
|
+--Node
|
+--Token
in Token.csA token node. This class represents a token (i.e. a set of adjacent characters) in a parse tree. The tokens are created by a tokenizer, that groups characters together into tokens according to a set of token patterns.
| Field Summary | |
override int |
EndColumn
The column number property of the last character in this node (read-only). |
override int |
EndLine
The line number property of the last character in this node (read-only). |
override int |
Id
The node type id property (read-only). |
string |
Image
The token image property (read-only). |
override string |
Name
The node name property (read-only). |
Token |
Next
The next token property. |
internal TokenPattern |
Pattern
The token pattern property (read-only). |
Token |
Previous
The previous token property. |
override int |
StartColumn
The column number property of the first character in this node (read-only). |
override int |
StartLine
The line number property of the first character in this node (read-only). |
| Fields inherited from class Node |
Id, Name, StartLine, StartColumn, EndLine, EndColumn, Parent, Count, this, Values |
| Constructor Summary | |
Token( TokenPattern pattern, string image, int line, int col )
Creates a new token. |
|
| Method Summary | |
string |
GetImage()
Deprecated. Use the Image property instead. |
Token |
GetNextToken()
Deprecated. Use the Next property instead. |
Token |
GetPreviousToken()
Deprecated. Use the Previous property instead. |
string |
ToShortString()
Returns a short string representation of this token. |
override string |
ToString()
Returns a string representation of this token. |
| Methods inherited from class Node |
IsHidden, GetId, GetName, GetStartLine, GetStartColumn, GetEndLine, GetEndColumn, GetParent, SetParent, GetChildCount, GetDescendantCount, GetChildAt, GetValueCount, GetValue, GetAllValues, AddValue, AddValues, RemoveAllValues, PrintTo |
| Field Detail |
public override int EndColumn;
public override int EndLine;
public override int Id;
public string Image;
public override string Name;
public Token Next;
Previous, Tokenizer.UseTokenListinternal TokenPattern Pattern;
public Token Previous;
Next, Tokenizer.UseTokenListpublic override int StartColumn;
public override int StartLine;
| Constructor Detail |
public Token( TokenPattern pattern, string image, int line, int col );
pattern - the token pattern
image - the token image (i.e. characters)
line - the line number of the first character
col - the column number of the first character| Method Detail |
public string GetImage();
Returns the token image. The token image consists of the input characters matched to form this token.
Imagepublic Token GetNextToken();
Returns the next token. The next token may be a token that has been ignored in the parsing. Note that if the token list feature hasn't been used in the tokenizer, this method will always return null. By default the token list feature is not used.
Next, GetPreviousToken, Tokenizer.UseTokenListpublic Token GetPreviousToken();
Returns the previous token. The previous token may be a token that has been ignored in the parsing. Note that if the token list feature hasn't been used in the tokenizer, this method will always return null. By default the token list feature is not used.
Previous, GetNextToken, Tokenizer.UseTokenListpublic string ToShortString();
public override string ToString();
|
Grammatica 1.5 Documentation | |||||||
| FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||