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