[YANGTOOLS-28] New parser builder imports all yang files in directory Created: 30/Sep/13 Updated: 10/Apr/22 Resolved: 01/Oct/13 |
|
| Status: | Resolved |
| Project: | yangtools |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | ||
| Reporter: | Christopher Hartley | Assignee: | Unassigned |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Operating System: Windows |
||
| External issue ID: | 91 |
| Description |
|
The new builder Below shows the key code I used to build the list (I have omitted the antlr related code, but happy to attach that if it helps). =============================================================== >>> So my call in main was. >>>and here are the methods // parse the imports in the main file imports = new HashSet<String>(127); getYangImports(fileName, dirStr); // recursively get the file imports Iterator<String> i = imports.iterator(); while (i.hasNext()) { files.add(new File(dirStr + File.separator + i.next()+ YANG_FILE_EXTENSION)); } return files; // recursively parse the imported yang files Set<String> fileImports = getYangFileImports(fileName, dirStr); if (!fileImports.isEmpty()) { // have some imports ! while (i.hasNext()) { } // get the import statements in each file |
| Comments |
| Comment by Martin Vitez [ 01/Oct/13 ] |
|
Fixed in yang-parser-impl version 0.5.9-SNAPSHOT. |