2006-06-25 Marek Sieradzki <marek.sieradzki@gmail.com>
[mono.git] / mcs / class / Microsoft.Build.Engine / Microsoft.Build.BuildEngine / Token.cs
1 //
2 // TokenType.cs
3 //
4 // Author:
5 //   Marek Sieradzki (marek.sieradzki@gmail.com)
6 //   Jaroslaw Kowalski <jaak@jkowalski.net>
7 // 
8 // (C) 2006 Marek Sieradzki
9 // (C) 2004-2006 Jaroslaw Kowalski
10 //
11 // Permission is hereby granted, free of charge, to any person obtaining
12 // a copy of this software and associated documentation files (the
13 // "Software"), to deal in the Software without restriction, including
14 // without limitation the rights to use, copy, modify, merge, publish,
15 // distribute, sublicense, and/or sell copies of the Software, and to
16 // permit persons to whom the Software is furnished to do so, subject to
17 // the following conditions:
18 //
19 // The above copyright notice and this permission notice shall be
20 // included in all copies or substantial portions of the Software.
21 //
22 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
23 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
24 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
25 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
26 // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
27 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
28 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
29
30 #if NET_2_0
31
32 namespace Microsoft.Build.BuildEngine {
33
34         internal class Token {
35         
36                 string          tokenValue;
37                 TokenType       tokenType;
38         
39                 public Token (string tokenValue, TokenType tokenType)
40                 {
41                         this.tokenValue = tokenValue;
42                         this.tokenType = tokenType;
43                 }
44                 
45                 public string Value {
46                         get { return tokenValue; }
47                 }
48                 
49                 public TokenType Type {
50                         get { return tokenType; }
51                 }
52         }
53         
54         internal enum TokenType {
55                 EOF,
56                 BOF,
57                 Number,
58                 String,
59                 //Keyword,
60                 Punct,
61                 WhiteSpace,
62                 Item,
63                 Property,
64                 Metadata,
65                 Transform,
66                 LiteralSubExpression,
67
68                 FirstPunct,
69
70                 Less,
71                 Greater,
72                 LessOrEqual,
73                 GreaterOrEqual,
74                 Equal,
75                 NotEqual,
76                 LeftParen,
77                 RightParen,
78                 Dot,
79                 Comma,
80                 Not,
81                 And,
82                 Or,
83                 Apostrophe,
84                 
85                 LastPunct,
86                 Invalid,
87         }
88 }
89
90 #endif