Load a group file with full path fileName; it's relative to root by prefix.
(String prefix, String fileName)
| 627 | /** Load a group file with full path {@code fileName}; it's relative to root by {@code prefix}. */ |
| 628 | |
| 629 | public void loadGroupFile(String prefix, String fileName) { |
| 630 | if ( verbose ) System.out.println(this.getClass().getSimpleName()+".loadGroupFile(group-file-prefix="+prefix + |
| 631 | ", fileName=" + |
| 632 | fileName + |
| 633 | ")"); |
| 634 | GroupParser parser; |
| 635 | try { |
| 636 | URL f = new URL(fileName); |
| 637 | ANTLRInputStream fs = new ANTLRInputStream(f.openStream(), encoding); |
| 638 | GroupLexer lexer = new GroupLexer(fs); |
| 639 | fs.name = fileName; |
| 640 | CommonTokenStream tokens = new CommonTokenStream(lexer); |
| 641 | parser = new GroupParser(tokens); |
| 642 | parser.group(this, prefix); |
| 643 | } |
| 644 | catch (Exception e) { |
| 645 | errMgr.IOError(null, ErrorType.CANT_LOAD_GROUP_FILE, e, fileName); |
| 646 | } |
| 647 | } |
| 648 | |
| 649 | /** Load template file into this group using absolute {@code fileName}. */ |
| 650 |
no test coverage detected