ViScript 1.0 Released

这是一个基于.NET的元脚本语言。顾名思义就是用来创造脚本语言的框架。项目主页:http://code.google.com/p/viscript/

主要思想很简单:
用方法来创造句法,用句号隔开句子,然后由句子构成脚本。在构成句法方面,支持用下划线表达字符,参数任意位置插入,参数类型可扩展,支持从句,支持引号表示字面意义,支持歧义分析。

未来的发展方向是写一个IDE,并支持重构。

Sample:

Sentence <-> Method

c# 代码
  1. [Scriptable]  
  2. void user_login_with_password(string user, string password)  

Script <-> Sentences

taowen login with password 123. he send a message hello to qq. qq should receive message hello.

Clause <-> Delegate

c# 代码
  1. [Scriptable]  
  2. public void action_repeat_count_times(Clause action, int count)  
  3. {  
  4.       while (count-- > 0)  
  5.       {  
  6.             action();  
  7.       }  

原文地址:https://www.cnblogs.com/taowen/p/923951.html