• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Parser.Token类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中Deveel.Data.Sql.Parser.Token的典型用法代码示例。如果您正苦于以下问题:C# Token类的具体用法?C# Token怎么用?C# Token使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



Token类属于Deveel.Data.Sql.Parser命名空间,在下文中一共展示了Token类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: RefType

        public static DataType RefType(Token tokRef, ObjectName objRef, bool rowType, bool extRef)
        {
            if (extRef)
                throw new NotSupportedException();

            if (objRef == null && tokRef != null)
                objRef = ObjectName(tokRef.image);

            return rowType ? (DataType) PrimitiveTypes.RowType(objRef) : PrimitiveTypes.ColumnType(objRef);
        }
开发者ID:kaktusan,项目名称:plsqlparser,代码行数:10,代码来源:ParserUtil.cs


示例2: PlSql

 public PlSql(System.IO.TextReader stream)
 {
     mcc_input_stream = new SimpleCharStream(stream, 1, 1);
     token_source = new PlSqlTokenManager(mcc_input_stream);
     token = new Token();
     mcc_ntk = -1;
     mcc_gen = 0;
     for (int i = 0; i < 239; i++) mcc_la1[i] = -1;
     for (int i = 0; i < mcc_2_rtns.Length; i++) mcc_2_rtns[i] = new MccCalls();
 }
开发者ID:kaktusan,项目名称:plsqlparser,代码行数:10,代码来源:PlSql.cs


示例3: PrimitiveType

        public static DataType PrimitiveType(SqlType sqlType, Token sizeToken, Token scaleToken)
        {
            int size = -1;
            byte scale = 0;
            if (sizeToken != null) {
                if (!Int32.TryParse(sizeToken.image, out size))
                    throw new ParseException();
            }
            if (scaleToken != null) {
                if (!Byte.TryParse(scaleToken.image, out scale))
                    throw new ParseException();
            }

            return PrimitiveTypes.Type(sqlType, size, scale);
        }
开发者ID:kaktusan,项目名称:plsqlparser,代码行数:15,代码来源:ParserUtil.cs


示例4: MakeLabel

 public static String MakeLabel(Token start, Token end)
 {
     StringBuilder buf = new StringBuilder();
     Token t = start.next;
     bool last_letter = false;
     while (t != end) {
         bool is_letter_token = Char.IsLetter(t.image[0]);
         if (is_letter_token) {
             if (last_letter) {
                 buf.Append(' ');
             }
             last_letter = true;
         } else {
             last_letter = false;
         }
         buf.Append(t.image);
         t = t.next;
     }
     buf.Append(t.image);
     return buf.ToString();
 }
开发者ID:ikvm,项目名称:deveelsql,代码行数:21,代码来源:Util.cs


示例5: AsNonQuotedRef

        public static String AsNonQuotedRef(Token token)
        {
            if (token.kind == SqlParserConstants.QUOTED_VARIABLE)
                // Strip " from start and end if a quoted variable
                return token.image.Substring(1, token.image.Length - 2);

            if (token.kind == SqlParserConstants.QUOTED_DELIMINATED_REF ||
                token.kind == SqlParserConstants.QUOTEDGLOBVARIABLE) {
                // Remove all " from the string
                string image = token.image;
                StringBuilder b = new StringBuilder();
                int sz = image.Length;
                for (int i = 0; i < sz; ++i) {
                    char c = image[i];
                    if (c != '\"') {
                        b.Append(c);
                    }
                }
                return b.ToString();
            }

            return token.image;
        }
开发者ID:ikvm,项目名称:deveelsql,代码行数:23,代码来源:Util.cs


示例6: mcc_3_59

 private bool mcc_3_59()
 {
     if (mcc_3R_66()) return true;
     Token xsp;
     xsp = mcc_scanpos;
     if (mcc_3R_261()) mcc_scanpos = xsp;
     return false;
 }
开发者ID:kaktusan,项目名称:plsqlparser,代码行数:8,代码来源:PlSql.cs


示例7: mcc_3_54

 private bool mcc_3_54()
 {
     if (mcc_3R_66()) return true;
     Token xsp;
     while (true) {
       xsp = mcc_scanpos;
       if (mcc_3R_213()) { mcc_scanpos = xsp; break; }
     }
     return false;
 }
开发者ID:kaktusan,项目名称:plsqlparser,代码行数:10,代码来源:PlSql.cs


示例8: mcc_3_56

 private bool mcc_3_56()
 {
     Token xsp;
     xsp = mcc_scanpos;
     if (mcc_3R_77()) mcc_scanpos = xsp;
     xsp = mcc_scanpos;
     if (mcc_3_55()) {
     mcc_scanpos = xsp;
     if (mcc_3R_78()) return true;
     }
     return false;
 }
开发者ID:kaktusan,项目名称:plsqlparser,代码行数:12,代码来源:PlSql.cs


示例9: ParseNumberToken

 public static SqlObject ParseNumberToken(Token token, bool negative)
 {
     if (negative)
         return new SqlObject(BigNumber.Parse("-" + token.image));
     return new SqlObject(BigNumber.Parse(token.image));
 }
开发者ID:ikvm,项目名称:deveelsql,代码行数:6,代码来源:Util.cs


示例10: mcc_3R_96

 private bool mcc_3R_96()
 {
     Token xsp;
     xsp = mcc_scanpos;
     if (mcc_3R_121()) {
     mcc_scanpos = xsp;
     if (mcc_3_27()) return true;
     }
     return false;
 }
开发者ID:kaktusan,项目名称:plsqlparser,代码行数:10,代码来源:PlSql.cs


示例11: mcc_3_36

 private bool mcc_3_36()
 {
     Token xsp;
     xsp = mcc_scanpos;
     if (mcc_3R_69()) mcc_scanpos = xsp;
     if (mcc_3R_70()) return true;
     return false;
 }
开发者ID:kaktusan,项目名称:plsqlparser,代码行数:8,代码来源:PlSql.cs


示例12: mcc_scan_token

 private bool mcc_scan_token(int kind)
 {
     if (mcc_scanpos == mcc_lastpos) {
       mcc_la--;
       if (mcc_scanpos.next == null) {
     mcc_lastpos = mcc_scanpos = mcc_scanpos.next = token_source.GetNextToken();
       } else {
     mcc_lastpos = mcc_scanpos = mcc_scanpos.next;
       }
     } else {
       mcc_scanpos = mcc_scanpos.next;
     }
     if (mcc_rescan) {
       int i = 0; Token tok = token;
       while (tok != null && tok != mcc_scanpos) { i++; tok = tok.next; }
       if (tok != null) mcc_add_error_token(kind, i);
     }
     if (mcc_scanpos.kind != kind) return true;
     if (mcc_la == 0 && mcc_scanpos == mcc_lastpos) throw mcc_ls;
     return false;
 }
开发者ID:kaktusan,项目名称:plsqlparser,代码行数:21,代码来源:PlSql.cs


示例13: mcc_3_2

 private bool mcc_3_2()
 {
     Token xsp;
     xsp = mcc_scanpos;
     lookingAhead = true;
     mcc_semLA = !seeTYPE();
     lookingAhead = false;
     if (!mcc_semLA || mcc_3R_46()) {
     mcc_scanpos = xsp;
     lookingAhead = true;
     mcc_semLA = !seeTYPE();
     lookingAhead = false;
     if (!mcc_semLA || mcc_3R_47()) return true;
     }
     return false;
 }
开发者ID:kaktusan,项目名称:plsqlparser,代码行数:16,代码来源:PlSql.cs


示例14: mcc_3_21

 private bool mcc_3_21()
 {
     Token xsp;
     xsp = mcc_scanpos;
     if (mcc_scan_token(144)) {
     mcc_scanpos = xsp;
     if (mcc_scan_token(116)) return true;
     }
     if (mcc_scan_token(169)) return true;
     if (mcc_3R_54()) return true;
     return false;
 }
开发者ID:kaktusan,项目名称:plsqlparser,代码行数:12,代码来源:PlSql.cs


示例15: mcc_3_1

 private bool mcc_3_1()
 {
     Token xsp;
     xsp = mcc_scanpos;
     lookingAhead = true;
     mcc_semLA = seeTYPE();
     lookingAhead = false;
     if (!mcc_semLA || mcc_3R_42()) {
     mcc_scanpos = xsp;
     if (mcc_3R_43()) {
     mcc_scanpos = xsp;
     if (mcc_3R_44()) {
     mcc_scanpos = xsp;
     if (mcc_3R_45()) return true;
     }
     }
     }
     return false;
 }
开发者ID:kaktusan,项目名称:plsqlparser,代码行数:19,代码来源:PlSql.cs


示例16: mcc_3R_99

 private bool mcc_3R_99()
 {
     if (mcc_3R_54()) return true;
     Token xsp;
     xsp = mcc_scanpos;
     if (mcc_3R_123()) mcc_scanpos = xsp;
     if (mcc_scan_token(K_TO)) return true;
     if (mcc_3R_54()) return true;
     xsp = mcc_scanpos;
     if (mcc_3R_124()) mcc_scanpos = xsp;
     return false;
 }
开发者ID:kaktusan,项目名称:plsqlparser,代码行数:12,代码来源:PlSql.cs


示例17: mcc_3R_98

 private bool mcc_3R_98()
 {
     if (mcc_scan_token(K_FROM)) return true;
     if (mcc_3R_228()) return true;
     Token xsp;
     while (true) {
       xsp = mcc_scanpos;
       if (mcc_3R_229()) { mcc_scanpos = xsp; break; }
     }
     return false;
 }
开发者ID:kaktusan,项目名称:plsqlparser,代码行数:11,代码来源:PlSql.cs


示例18: mcc_consume_token

 private Token mcc_consume_token(int kind)
 {
     Token oldToken = null;
     if ((oldToken = token).next != null) token = token.next;
     else token = token.next = token_source.GetNextToken();
     mcc_ntk = -1;
     if (token.kind == kind) {
       mcc_gen++;
       if (++mcc_gc > 100) {
     mcc_gc = 0;
     for (int i = 0; i < mcc_2_rtns.Length; i++) {
       MccCalls c = mcc_2_rtns[i];
       while (c != null) {
     if (c.gen < mcc_gen) c.first = null;
     c = c.next;
       }
     }
       }
       return token;
     }
     token = oldToken;
     mcc_kind = kind;
     throw GenerateParseException();
 }
开发者ID:kaktusan,项目名称:plsqlparser,代码行数:24,代码来源:PlSql.cs


示例19: ParseTableName

        public static TableName ParseTableName(Token token)
        {
            if (token.kind == SqlParserConstants.QUOTED_VARIABLE ||
                token.kind == SqlParserConstants.GLOBVARIABLE ||  // eg. Part.*
                token.kind == SqlParserConstants.IDENTIFIER ||
                token.kind == SqlParserConstants.DOT_DELIMINATED_REF ||
                token.kind == SqlParserConstants.QUOTED_DELIMINATED_REF) {

                return TableName.Resolve(AsNonQuotedRef(token));
            }

            return TableName.Resolve(token.image);
        }
开发者ID:ikvm,项目名称:deveelsql,代码行数:13,代码来源:Util.cs


示例20: mcc_3R_91

 private bool mcc_3R_91()
 {
     if (mcc_3R_119()) return true;
     Token xsp;
     while (true) {
       xsp = mcc_scanpos;
       if (mcc_3R_234()) { mcc_scanpos = xsp; break; }
     }
     return false;
 }
开发者ID:kaktusan,项目名称:plsqlparser,代码行数:10,代码来源:PlSql.cs



注:本文中的Deveel.Data.Sql.Parser.Token类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# EF.DeviceHiveContext类代码示例发布时间:2022-05-24
下一篇:
C# Expressions.SqlQueryExpression类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap