Load a group file with full path fileName; it's relative to root by prefix.
(String prefix, String fileName)
| 612 | /** Load a group file with full path {@code fileName}; it's relative to root by {@code prefix}. */ |
| 613 | |
| 614 | public void loadGroupFile(String prefix, String fileName) { |
| 615 | if ( verbose ) System.out.println(this.getClass().getSimpleName()+".loadGroupFile(group-file-prefix="+prefix + |
| 616 | ", fileName=" + |
| 617 | fileName + |
| 618 | ")"); |
| 619 | GroupParser parser; |
| 620 | try { |
| 621 | URL f = new URL(fileName); |
| 622 | ANTLRInputStream fs = new ANTLRInputStream(f.openStream(), encoding); |
| 623 | GroupLexer lexer = new GroupLexer(fs); |
| 624 | fs.name = fileName; |
| 625 | CommonTokenStream tokens = new CommonTokenStream(lexer); |
| 626 | parser = new GroupParser(tokens); |
| 627 | parser.group(this, prefix); |
| 628 | } |
| 629 | catch (Exception e) { |
| 630 | errMgr.IOError(null, ErrorType.CANT_LOAD_GROUP_FILE, e, fileName); |
| 631 | } |
| 632 | } |
| 633 | |
| 634 | /** Load template file into this group using absolute {@code fileName}. */ |
| 635 |
no test coverage detected