Code Review
/
yangtools.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
history
|
raw
|
HEAD
Bug 2366 - Effective statments impl merge, retest & bugfix
[yangtools.git]
/
yang
/
yang-parser-impl
/
src
/
test
/
resources
/
semantic-statement-parser
/
types2.yang
1
module types2 {
2
namespace "types2";
3
prefix "t2";
4
5
leaf lf-decimal {
6
type decimal64 {
7
fraction-digits 2;
8
range "1 .. 3.14 | 10 | 15..16 | 20..max";
9
}
10
}
11
12
leaf lf-my-string {
13
type string {
14
length "1..255 | 320..max";
15
pattern "[0-9a-fA-F]*";
16
pattern "aa*";
17
}
18
}
19
20
leaf my-bits {
21
type bits {
22
bit disable-nagle {
23
position 0;
24
status current;
25
}
26
bit auto-sense-speed {
27
position 1;
28
}
29
bit 10-Mb-only {
30
position 2;
31
}
32
}
33
default "auto-sense-speed";
34
}
35
36
type union {
37
type int32;
38
type string;
39
}
40
41
grouping grp1 {
42
leaf myenum {
43
type enumeration {
44
enum zero;
45
enum one;
46
enum seven {
47
value 7;
48
}
49
}
50
default zero;
51
}
52
}
53
54
container uses-cont {
55
uses t2:grp1 {
56
refine myenum {
57
default one;
58
}
59
}
60
}
61
62
leaf lf-int8 {
63
type int8;
64
}
65
66
leaf lf-int16 {
67
type int16;
68
}
69
70
leaf lf-int32 {
71
type int32;
72
}
73
74
leaf lf-int64 {
75
type int64;
76
}
77
78
leaf lf-uint8 {
79
type uint8;
80
}
81
82
leaf lf-uint16 {
83
type uint16;
84
}
85
86
leaf lf-uint32 {
87
type uint32;
88
}
89
90
leaf lf-uint64 {
91
type uint64;
92
}
93
94
leaf lf-bool {
95
type boolean;
96
}
97
}