[YANGTOOLS-798] regular expressions needs to support branches Created: 19/Jul/17 Updated: 25/Feb/18 Resolved: 25/Feb/18 |
|
| Status: | Resolved |
| Project: | yangtools |
| Component/s: | parser |
| Affects Version/s: | 1.2.1, 1.1.2, 1.0.4, 2.0.1 |
| Fix Version/s: | 1.1.4, 2.0.2, 1.2.3 |
| Type: | Bug | ||
| Reporter: | anzhe | Assignee: | Robert Varga |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Operating System: All |
||
| External issue ID: | 8867 |
| Description |
|
I am using "stable/boron". When I compile yang files to java, I think yangtools mistakenly interprets the regular expressions. } } The XSD regular expressions "[0-9a-f]{8} /[a-z]/[0-9]|top[a-z]*fd" has two branches, but after converted to Java code, the Java regular expressions is "^[0-9a-f] {8}/[a-z]/[0-9]|top[a-z]*fd$".I think it should be "^[0-9a-f]{8} /[a-z]/[0-9]$|^top[a-z]*fd$". |
| Comments |
| Comment by Robert Varga [ 20/Feb/18 ] |
|
I am not sure we can do a complete analysis, as the results of that were ... less than stellar. I think we should further update escaping to just wrap the expression in a non-capturing group. |
| Comment by Robert Varga [ 20/Feb/18 ] |
| Comment by Robert Varga [ 21/Feb/18 ] |
|
1.2.x: **https://git.opendaylight.org/gerrit/68461
|