-
Notifications
You must be signed in to change notification settings - Fork 3
/
Token.cs
48 lines (43 loc) · 1.24 KB
/
Token.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/*
* Copyright (c) 2003-2017 by Alexander Gnauck, AG-Software
* All Rights Reserved.
* Contact information for AG-Software is available at http://www.ag-software.de
*
* xpnet is a deriviative of James Clark's XP parser.
* See copying.txt for more info.
*/
namespace XpNet
{
/// <summary>
/// A token that was parsed.
/// </summary>
public class Token
{
/// <summary>
/// The end of the current token, in relation to the beginning of the buffer.
/// </summary>
public int TokenEnd { get; set; } = -1;
/// <summary>
/// The end of the current token's name, in relation to the beginning of the buffer.
/// </summary>
public int NameEnd { get; set; } = -1;
//public char RefChar
//{
// get {return refChar1;}
//}
/// <summary>
/// The parsed-out character. & for &amp;
/// </summary>
public char RefChar1 { get; set; } = (char) 0;
/// <summary>
/// The second of two parsed-out characters. TODO: find example.
/// </summary>
public char RefChar2 { get; set; } = (char) 0;
/*
public void getRefCharPair(char[] ch, int off) {
ch[off] = refChar1;
ch[off + 1] = refChar2;
}
*/
}
}