Token.cs source code in C# .NET

Source code for the .NET framework in C#

                        

Code:

/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / WF / Activities / Rules / Parser / Token.cs / 1305376 / Token.cs

                            #region Using directives 

using System;
using System.Collections.Generic;
using System.Text; 

#endregion 
 
namespace System.Workflow.Activities.Rules
{ 
    internal enum TokenID
    {
        Unknown,
        Identifier, 
        Dot,
        Comma, 
        LParen, 
        RParen,
        Plus,               // + 
        Minus,              // -
        Divide,             // /
        Multiply,           // *
        Modulus,            // MOD 
        BitAnd,             // &
        BitOr,              // | 
        And,                // AND, && 
        Or,                 // OR, ||
        Not,                // NOT, ! 
        Equal,              // ==
        NotEqual,           // !=, <>
        Less,               // <
        LessEqual,          // <= 
        Greater,            // >
        GreaterEqual,       // >= 
        StringLiteral,      // " ... " 
        CharacterLiteral,   // ' ... '
        IntegerLiteral, 
        DecimalLiteral,
        FloatLiteral,
        True,
        False, 
        Null,
        This, 
        In, 
        Out,
        Ref, 
        Assign,
        TypeName,
        Update,
        Halt, 
        Semicolon,          // ;
        LBracket,           // [ 
        RBracket,           // ] 
        LCurlyBrace,        // {
        RCurlyBrace,        // } 
        New,
        Illegal,

        EndOfInput 
    }
 
    internal class Token 
    {
        internal TokenID TokenID; 
        internal int StartPosition;
        internal object Value;

        internal Token(TokenID tokenID, int position, object value) 
        {
            this.TokenID = tokenID; 
            this.StartPosition = position; 
            this.Value = value;
        } 
    }
}

// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.
#region Using directives 

using System;
using System.Collections.Generic;
using System.Text; 

#endregion 
 
namespace System.Workflow.Activities.Rules
{ 
    internal enum TokenID
    {
        Unknown,
        Identifier, 
        Dot,
        Comma, 
        LParen, 
        RParen,
        Plus,               // + 
        Minus,              // -
        Divide,             // /
        Multiply,           // *
        Modulus,            // MOD 
        BitAnd,             // &
        BitOr,              // | 
        And,                // AND, && 
        Or,                 // OR, ||
        Not,                // NOT, ! 
        Equal,              // ==
        NotEqual,           // !=, <>
        Less,               // <
        LessEqual,          // <= 
        Greater,            // >
        GreaterEqual,       // >= 
        StringLiteral,      // " ... " 
        CharacterLiteral,   // ' ... '
        IntegerLiteral, 
        DecimalLiteral,
        FloatLiteral,
        True,
        False, 
        Null,
        This, 
        In, 
        Out,
        Ref, 
        Assign,
        TypeName,
        Update,
        Halt, 
        Semicolon,          // ;
        LBracket,           // [ 
        RBracket,           // ] 
        LCurlyBrace,        // {
        RCurlyBrace,        // } 
        New,
        Illegal,

        EndOfInput 
    }
 
    internal class Token 
    {
        internal TokenID TokenID; 
        internal int StartPosition;
        internal object Value;

        internal Token(TokenID tokenID, int position, object value) 
        {
            this.TokenID = tokenID; 
            this.StartPosition = position; 
            this.Value = value;
        } 
    }
}

// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.
                        

Link Menu

Network programming in C#, Network Programming in VB.NET, Network Programming in .NET
This book is available now!
Buy at Amazon US or
Buy at Amazon UK