Changes between Version 30 and Version 31 of NameSpaces
- Timestamp:
- 2017-09-12 11:21:04 (8 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
NameSpaces
v30 v31 1 1 [[TOC]][[BackLinksMenu]] 2 2 3 = 1) Namespaces = 3 We need to create name spaces.[[BR]][[BR]] 4 Namespaces are 5 * commonly structured as hierarchies to allow reuse of names in different contexts. 6 * typically employed for the purpose of grouping symbols and identifiers around a particular functionality and to avoid name collisions between multiple identifiers that share the same name. 7 * hierarchical, ie sets of namespaces can be nested within another namespace 4 == Namespaces : Context == 5 We need to create name spaces.[[BR]][[BR]] Namespaces are 8 6 7 * commonly structured as hierarchies to allow reuse of names in different contexts. 8 * typically employed for the purpose of grouping symbols and identifiers around a particular functionality and to avoid name collisions between multiple identifiers that share the same name. 9 * hierarchical, ie sets of namespaces can be nested within another namespace 10 11 == Namespaces : Examples == 12 === In TDX === 13 {{{ 14 NAMESPACE $project 15 }}} 16 17 Puts anything following in the current project context 18 19 || {{{ NAMESPACE $project:subComponent }}} || {{{ NAMESPACE subComponent }}} || 20 21 Puts everyting that follows 22 23 === In VDX === 24 == Namespaces : Semantics == 25 == Namespaces : Data Definition == 9 26 To store namespaces we need a structure similar to that detailed below ... [wiki:NotationExplaination explaination of the notation] 10 27 11 == 1) Namespace DATA DEFINITION (tdx)==28 === In TDX === 12 29 {{{ 13 30 NAMESPACE $project:tdx - $system:lang … … 37 54 existingNameClause := ( "$" ident ( ":" ident )* | ident ( ":" ident )+ ); 38 55 }}} 56 === In VDX === 57 [[Image(namespace.png,width=98%)]] 39 58 40 == 1) Namespace DATA DEFINITION (vdx)==59 == Namespaces : Syntax == 41 60 === INFORMATION MODEL === 42 [[Image(namespace.png,width=98%)]] 43 === PROCEDURAL MODEL === 44 [[Image(namespaceClause.png,width=98%)]] 45 [[Image(newNamespaceClause.png,width=98%)]] 46 [[Image(existingNamespaceClause.png,width=98%)]] 61 === '''PROCEDURAL MODEL''' === 62 [[Image(namespaceClause.png,width=98%)]] [[Image(newNamespaceClause.png,width=98%)]] [[Image(existingNamespaceClause.png,width=98%)]] 47 63 48 64 == (2) [wiki:TypeDefinition Types] ==