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+", fileName="+fileName+")"); |
| 631 | GroupParser parser; |
| 632 | try { |
| 633 | URL f = new URL(fileName); |
| 634 | ANTLRInputStream fs = new ANTLRInputStream(f.openStream(), encoding); |
| 635 | GroupLexer lexer = new GroupLexer(fs); |
| 636 | fs.name = fileName; |
| 637 | CommonTokenStream tokens = new CommonTokenStream(lexer); |
| 638 | parser = new GroupParser(tokens); |
| 639 | parser.group(this, prefix); |
| 640 | } |
| 641 | catch (Exception e) { |
| 642 | errMgr.IOError(null, ErrorType.CANT_LOAD_GROUP_FILE, e, fileName); |
| 643 | } |
| 644 | } |
| 645 | |
| 646 | /** Load template file into this group using absolute {@code fileName}. */ |
| 647 |
no test coverage detected