Click Notes II - Click Script Language
2015-01-09 01:12
344 查看
The Click programming language was developed to configure Click
routers, but nowadays you also can use it to write test cases for Click elements.
Basic Syntax
Element Group
Compound Element
Script
Testie
The Click Script Language defines a configuration graph, which consists of connected elements. Each element has an element class specified by class name. Elements are connected through their input and output ports. Input and output ports are distinguished by
number, while elements are distinguished by name.
Click configuration strings are comma-separated lists of arguments delimited by parentheses. The fundamental syntax of Click Script Language is:
[/code]
- See more at:
http://www.bo-yang.net/2015/01/07/click-notes-click-language/#sthash.ayG2hR5q.dpuf
routers, but nowadays you also can use it to write test cases for Click elements.
Basic Syntax
Element Group
Compound Element
Script
Testie
Basic Syntax
The Click Script Language defines a configuration graph, which consists of connected elements. Each element has an element class specified by class name. Elements are connected through their input and output ports. Input and output ports are distinguished bynumber, while elements are distinguished by name.
Click configuration strings are comma-separated lists of arguments delimited by parentheses. The fundamental syntax of Click Script Language is:
name :: class(config-string); // declare element object
name1, name2, ..., nameN :: class(config); // declaration shorhand
name1[port1] -> [port2]name2; // connect two elements
name1[port1] -> [port2a]name2[port2b] -> [port3]name3; // piggyback connections
name1 -> name2 :: class(config-string) -> name3; // declaring elements inside connections is allowed
name1 -> class(config-string) -> name3; // anonymous element
require(requirement[, requirement …]); // list config requirements
n1, n2 :: class -> n3; // many-to-one connections
// many-to-many connections:
// A many-to-many connection matches output ports to input ports.
// There must be as many ports on the left as on the right.
// '=>' is the many-to-many connector.
c[0], c[1], c[2] => Paint(0), Paint(1), Paint(2) -> next;
c => Paint(0), Paint(1), Paint(2) -> next;
[/code]
http://www.bo-yang.net/2015/01/07/click-notes-click-language/#sthash.ayG2hR5q.dpuf
相关文章推荐
- The C# Programming Language Notes II
- The C# Programming Language Notes II
- c programming language learn notes 11
- Hey, ready for the script language "Python"
- Undokumentierte @Formeln/LotusScript im Lotus Notes Client/Server
- Scheme Programming language II
- <script language="JavaScript">
- Web(click and script) 与 Web(HTTP/HTML)协议区别
- Essential Notes on Database(II) Relational Calculus 关系演算
- <script language= "javascript " for= "window " event= "onload ">
- JavaFX Script Programming Language 学习 No.6
- Undokumentierte @Formeln/LotusScript im Lotus Notes Client/Server
- 统计原理笔记 Notes for Statistics II
- Unity3D Script KeynoteII
- Notes on C programming language (0)
- script标签属性type与language使用选择
- Undokumentierte @Formeln/LotusScript im Lotus Notes R5 Client/Server
- <script language= "javascript " for= "window " event= "onload " /> 的问题解读
- c programe language learn notes 1
- c programming language learn notes 6