Bug 5396: Regex processing of yang models is broken.
[yangtools.git] / yang / yang-data-impl / src / test / resources / bug5396 / yang / foo.yang
1 module foo {
2     yang-version 1;
3     namespace "foo";
4     prefix "foo";
5
6     revision "2016-03-22" {
7         description "test";
8     }
9
10     container root {
11         leaf my-leaf {
12             type my-type;
13         }
14     }
15
16     typedef my-type {
17         type union {
18             type string {
19                 pattern "dp[0-9]+o[0-9]+";
20             }
21             type string {
22                 pattern "dp[0-9]+s[0-9]+(f[0-9]+)?(d[0-9]+)?";
23             }
24             type string {
25                 pattern "dp[0-9]+(P[0-9]+)?p[0-9]{1,3}s[0-9]{1,3}(f[0-9]+)?(d[0-9]+)?";
26             }
27             type string {
28                 pattern "dp[0-9]+p[0-9]+p[0-9]+";
29             }
30         }
31     }
32 }