当前位置: 首页>>代码示例>>C#>>正文


C# Module.SetName方法代码示例

本文整理汇总了C#中Module.SetName方法的典型用法代码示例。如果您正苦于以下问题:C# Module.SetName方法的具体用法?C# Module.SetName怎么用?C# Module.SetName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Module的用法示例。


在下文中一共展示了Module.SetName方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: SetUp

 public static void SetUp(Module module, Grammar grammar)
 {
     if (pattern == null)
     {
         BlockCommentPrototype.pattern
             = new AbstractPattern(null, "BlockCommentPrototype");    
         
         BlockCommentPrototype.pattern.SetType(typeof(BlockCommentPrototype));
         grammar.PatternDefined(BlockCommentPrototype.pattern);
         
         string expression = "s('/*' *(s(!('*/') a(0 any))) '*/')";
         ParseGraphNode parseGraph = BootstrapParser.Parse(expression,
             new Pattern[]{BlockCommentPrototype.pattern});
     
         pattern = new ConcretePattern(null, "BlockComment",
             parseGraph);
         
         pattern.SetType(typeof(BlockComment));
         
         BlockCommentPrototype.pattern.AddAltPattern(pattern);
     }
     
     module.SetName("BlockComment", typeof(BlockComment));
     grammar.PatternDefined(pattern);
 }
开发者ID:KevinKelley,项目名称:katahdin,代码行数:25,代码来源:BlockComment.cs

示例2: SetUp

 public static void SetUp(Module module, Grammar grammar)
 {
     if (pattern == null)
     {
         pattern = new AbstractPattern(null, "PatternExpression");
         pattern.SetType(typeof(PatternExpression));
     }
     
     module.SetName("PatternExpression", typeof(PatternExpression));
     grammar.PatternDefined(pattern);
 }
开发者ID:KevinKelley,项目名称:katahdin,代码行数:11,代码来源:PatternExpression.cs

示例3: SetUp

 public static void SetUp(Module module, Grammar grammar)
 {
     if (pattern == null)
     {
         pattern = new AbstractPattern(null, "Member");
         pattern.SetType(typeof(Member));
     }
     
     module.SetName("Member", typeof(Member));
     grammar.PatternDefined(pattern);
 }
开发者ID:KevinKelley,项目名称:katahdin,代码行数:11,代码来源:Member.cs

示例4: SetUp

 public new static void SetUp(Module module, Grammar grammar)
 {
     if (pattern == null)
     {
         pattern = new AbstractPattern(null, "UnaryExpression");
         pattern.SetType(typeof(UnaryExpression));
         
         Expression.pattern.AddAltPattern(pattern);
     }
     
     module.SetName("UnaryExpression", typeof(UnaryExpression));
     grammar.PatternDefined(pattern);
 }
开发者ID:KevinKelley,项目名称:katahdin,代码行数:13,代码来源:UnaryExpression.cs

示例5: SetUp

 public static void SetUp(Module module, Grammar grammar)
 {
     if (pattern == null)
     {
         string expression = "l(text o((whitespace null) t( s( '\\\"' *( a( s( !(a('\\\\' '\\\"')) any ) s('\\\\' a('\\\\' 'r' 'n' 't' '\\\"' '\\\'' '0') ) ) ) '\\\"' ) ) ) )";
         ParseGraphNode parseGraph = BootstrapParser.Parse(expression, null);
 
         pattern = new ConcretePattern(null, "String", parseGraph);
         pattern.SetType(typeof(String));
     }
     
     module.SetName("String", typeof(String));
     grammar.PatternDefined(pattern);
 }
开发者ID:KevinKelley,项目名称:katahdin,代码行数:14,代码来源:String.cs

示例6: SetUp

 public static void SetUp(Module module, Grammar grammar)
 {
     if (pattern == null)
     {
         string expression = "l(number o((whitespace null) t(s(+(r('0' '9')) ?(s('.' +(r('0' '9'))))))))";
     
         ParseGraphNode parseGraph = BootstrapParser.Parse(expression, null);
 
         pattern = new ConcretePattern(null, "Number", parseGraph);
         pattern.SetType(typeof(Number));
     }
     
     module.SetName("Number", typeof(Number));
     grammar.PatternDefined(pattern);
 }
开发者ID:KevinKelley,项目名称:katahdin,代码行数:15,代码来源:Number.cs

示例7: SetUp

 public new static void SetUp(Module module, Grammar grammar)
 {
     if (pattern == null)
     {
         ParseGraphNode parseGraph = BootstrapParser.Parse("'.'", null);
 
         pattern = new ConcretePattern(null, "AnyPatternExpression", parseGraph);
         pattern.SetType(typeof(AnyPatternExpression));
     
         PatternExpression.pattern.AddAltPattern(pattern);
     }
     
     module.SetName("AnyPatternExpression", typeof(AnyPatternExpression));
     grammar.PatternDefined(pattern);
 }
开发者ID:KevinKelley,项目名称:katahdin,代码行数:15,代码来源:AnyPatternExpression.cs

示例8: SetUp

 public static void SetUp(Module module, Grammar grammar)
 {
     if (pattern == null)
     {
         string expression = "+(a(' ' '\\t' s('\\r' ?('\\n')) '\\n'))";
     
         ParseGraphNode parseGraph = BootstrapParser.Parse(expression, null);
     
         pattern = new ConcretePattern(null, "DefaultWhitespace", parseGraph);
         pattern.SetType(typeof(DefaultWhitespace));
     }
     
     module.SetName("DefaultWhitespace", typeof(DefaultWhitespace));
     grammar.PatternDefined(pattern);
 }
开发者ID:KevinKelley,项目名称:katahdin,代码行数:15,代码来源:DefaultWhitespace.cs

示例9: SetUp

 public static void SetUp(Module module, Grammar grammar)
 {
     if (pattern == null)
     {
         string expression = "s('//' *(s(!(a( s('\r' ?('\n')) '\n' )) any)))";
     
         ParseGraphNode parseGraph = BootstrapParser.Parse(expression, null);
     
         pattern = new ConcretePattern(null, "LineComment", parseGraph);
         pattern.SetType(typeof(LineComment));
     }
     
     module.SetName("LineComment", typeof(LineComment));
     grammar.PatternDefined(pattern);
 }
开发者ID:KevinKelley,项目名称:katahdin,代码行数:15,代码来源:LineComment.cs

示例10: SetUp

 public new static void SetUp(Module module, Grammar grammar)
 {
     if (pattern == null)
     {
         string expression = "l(statement 0)";
         Pattern[] parameters = {Statement.pattern};
     
         ParseGraphNode parseGraph = BootstrapParser.Parse(expression, parameters);
     
         pattern = new ConcretePattern(null, "TopLevelStatement", parseGraph);
         pattern.SetType(typeof(TopLevelStatement));
     }
     
     module.SetName("TopLevelStatement", typeof(TopLevelStatement));
     grammar.PatternDefined(pattern);
 }
开发者ID:KevinKelley,项目名称:katahdin,代码行数:16,代码来源:TopLevelStatement.cs

示例11: SetUp

 public static void SetUp(Module module, Grammar grammar)
 {
     if (pattern == null)
     {
         string expression = "o((whitespace 0) l(statements *(1)))";
         Pattern[] patterns = {Whitespace.pattern, TopLevelStatement.pattern};
     
         ParseGraphNode parseGraph = BootstrapParser.Parse(expression, patterns);
     
         pattern = new ConcretePattern(null, "Program", parseGraph);
         pattern.SetType(typeof(Program));
     }
     
     module.SetName("Program", typeof(Program));
     grammar.PatternDefined(pattern);
 }
开发者ID:KevinKelley,项目名称:katahdin,代码行数:16,代码来源:Program.cs

示例12: SetUp

 public static void SetUp(Module module, Grammar grammar)
 {
     if (pattern == null)
     {
         string expression = "+(a(0 1 2))";
         Pattern[] patterns = {LineComment.pattern, BlockComment.pattern, DefaultWhitespace.pattern};
         
         ParseGraphNode parseGraph = BootstrapParser.Parse(expression, patterns);
     
         pattern = new ConcretePattern(null, "Whitespace", parseGraph);
         pattern.SetType(typeof(Whitespace));
     }
     
     module.SetName("Whitespace", typeof(Whitespace));
     grammar.PatternDefined(pattern);
 }
开发者ID:KevinKelley,项目名称:katahdin,代码行数:16,代码来源:Whitespace.cs

示例13: SetUp

 public new static void SetUp(Module module, Grammar grammar)
 {
     if (pattern == null)
     {
         string expression = "s('option' l(optionKey 0) ?(s('=' o((dropPrecedence true) l(optionValue 1)))) ';')";
         Pattern[] patterns = {Name.pattern, Expression.pattern};
     
         ParseGraphNode parseGraph = BootstrapParser.Parse(expression, patterns);
 
         pattern = new ConcretePattern(null, "Option", parseGraph);
         pattern.SetType(typeof(Option));
     }
     
     module.SetName("Option", typeof(Option));
     grammar.PatternDefined(pattern);
 }
开发者ID:KevinKelley,项目名称:katahdin,代码行数:16,代码来源:Option.cs

示例14: SetUp

 public new static void SetUp(Module module, Grammar grammar)
 {
     if (pattern == null)
     {
         string expression = "s('token' l(body 0))";
         Pattern[] patterns = {BlockPatternExpression.pattern};
     
         ParseGraphNode parseGraph = BootstrapParser.Parse(expression, patterns);
 
         pattern = new ConcretePattern(null, "TokenPatternExpression", parseGraph);
         pattern.SetType(typeof(TokenPatternExpression));
     
         PatternExpression.pattern.AddAltPattern(pattern);
     }
     
     module.SetName("TokenPatternExpression", typeof(TokenPatternExpression));
     grammar.PatternDefined(pattern);
 }
开发者ID:KevinKelley,项目名称:katahdin,代码行数:18,代码来源:TokenPatternExpression.cs

示例15: SetUp

 public new static void SetUp(Module module, Grammar grammar)
 {
     if (pattern == null)
     {
         string expression = "s('throw' l(exception 0) ';')";
         Pattern[] parameters = {Expression.pattern};
     
         ParseGraphNode parseGraph = BootstrapParser.Parse(expression, parameters);
     
         pattern = new ConcretePattern(null, "ThrowStatement", parseGraph);
         pattern.SetType(typeof(ThrowStatement));
     
         Statement.pattern.AddAltPattern(pattern);
     }
     
     module.SetName("ThrowStatement", typeof(ThrowStatement));
     grammar.PatternDefined(pattern);
 }
开发者ID:KevinKelley,项目名称:katahdin,代码行数:18,代码来源:ThrowStatement.cs


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