| 169 | } |
| 170 | |
| 171 | public void write(ST code, String fileName) { |
| 172 | try { |
| 173 | // long start = System.currentTimeMillis(); |
| 174 | Writer w = tool.getOutputFileWriter(g, fileName); |
| 175 | STWriter wr = new AutoIndentWriter(w); |
| 176 | wr.setLineWidth(lineWidth); |
| 177 | code.write(wr); |
| 178 | w.close(); |
| 179 | // long stop = System.currentTimeMillis(); |
| 180 | } |
| 181 | catch (IOException ioe) { |
| 182 | tool.errMgr.toolError(ErrorType.CANNOT_WRITE_FILE, |
| 183 | ioe, |
| 184 | fileName); |
| 185 | } |
| 186 | } |
| 187 | |
| 188 | public String getRecognizerFileName() { return getRecognizerFileName(false); } |
| 189 | public String getListenerFileName() { return getListenerFileName(false); } |