Exemple #1
0
 public STypeCollection(string TypeName, STokenType DataType)
     : base(TypeName)
 {
     this.Kind = SParameter.TokenTypeToAttribType(DataType);
 }
Exemple #2
0
 public SToken(int ShortValue)
 {
     TokenType    = STokenType.INTEGER;
     IntegerValue = ShortValue;
 }
Exemple #3
0
 /// <summary>
 /// token type conversion to attrib type
 /// </summary>
 /// <param name="tType">token type to convert</param>
 /// <returns></returns>
 public static SParamType TokenTypeToAttribType(STokenType tType)
 {
     SParamType saType;
     switch (tType)
     {
         case STokenType.SET:
             saType = SParamType.SET;
             break;
         case STokenType.LIST:
             saType = SParamType.LIST;
             break;
         case STokenType.ARRAY:
             saType = SParamType.ARRAY;
             break;
         case STokenType.BAG:
             saType = SParamType.BAG;
             break;
         case STokenType.REAL:
             saType = SParamType.REAL;
             break;
         case STokenType.NUMBER:
             saType = SParamType.NUMBER;
             break;
         case STokenType.INTEGER:
             saType = SParamType.INTEGER;
             break;
         case STokenType.BOOLEAN:
             saType = SParamType.BOOLEAN;
             break;
         case STokenType.STRING:
             saType = SParamType.STRING;
             break;
         case STokenType.BINARY:
             saType = SParamType.BINARY;
             break;
         case STokenType.SIMPLEID:
             saType = SParamType.NAMED;
             break;
         case STokenType.LOGICAL:
             saType = SParamType.LOGICAL;
             break;
         case STokenType.ENUMERATION:
             saType = SParamType.ENUMERATION;
             break;
         case STokenType.SELECT:
             saType = SParamType.SELECT;
             break;
         default:
             saType = SParamType.UNSET;
             //logFile.WriteLine(String.Format("Undefined attribute Type at {0}:{1}", SLexer.CurrentRow, SLexer.CurrentColumn));
             break;
     }
     return saType;
 }
Exemple #4
0
 public SToken(String SimpleID)
 {
     TokenType   = STokenType.SIMPLEID;
     StringValue = SimpleID;
 }
Exemple #5
0
 public SToken(STokenType TokenType)
 {
     this.TokenType = TokenType;
 }
Exemple #6
0
 public SToken(STokenType TokenType)
 {
     this.TokenType = TokenType;
 }
Exemple #7
0
        /// <summary>
        /// token type conversion to attrib type
        /// </summary>
        /// <param name="tType">token type to convert</param>
        /// <returns></returns>
        public static SParamType TokenTypeToAttribType(STokenType tType)
        {
            SParamType saType;

            switch (tType)
            {
            case STokenType.SET:
                saType = SParamType.SET;
                break;

            case STokenType.LIST:
                saType = SParamType.LIST;
                break;

            case STokenType.ARRAY:
                saType = SParamType.ARRAY;
                break;

            case STokenType.BAG:
                saType = SParamType.BAG;
                break;

            case STokenType.REAL:
                saType = SParamType.REAL;
                break;

            case STokenType.NUMBER:
                saType = SParamType.NUMBER;
                break;

            case STokenType.INTEGER:
                saType = SParamType.INTEGER;
                break;

            case STokenType.BOOLEAN:
                saType = SParamType.BOOLEAN;
                break;

            case STokenType.STRING:
                saType = SParamType.STRING;
                break;

            case STokenType.BINARY:
                saType = SParamType.BINARY;
                break;

            case STokenType.SIMPLEID:
                saType = SParamType.NAMED;
                break;

            case STokenType.LOGICAL:
                saType = SParamType.LOGICAL;
                break;

            case STokenType.ENUMERATION:
                saType = SParamType.ENUMERATION;
                break;

            case STokenType.SELECT:
                saType = SParamType.SELECT;
                break;

            default:
                saType = SParamType.UNSET;
                //logFile.WriteLine(String.Format("Undefined attribute Type at {0}:{1}", SLexer.CurrentRow, SLexer.CurrentColumn));
                break;
            }
            return(saType);
        }
Exemple #8
0
 public STypeCollection(string TypeName, STokenType DataType)
     : base(TypeName)
 {
     this.Kind = SParameter.TokenTypeToAttribType(DataType);
 }