public STypeCollection(string TypeName, STokenType DataType) : base(TypeName) { this.Kind = SParameter.TokenTypeToAttribType(DataType); }
public SToken(int ShortValue) { TokenType = STokenType.INTEGER; IntegerValue = ShortValue; }
/// <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; }
public SToken(String SimpleID) { TokenType = STokenType.SIMPLEID; StringValue = SimpleID; }
public SToken(STokenType TokenType) { this.TokenType = TokenType; }
/// <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); }