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