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