exptokseq[i] = (int[])jj_expentries.elementAt(i); return new ParseException(token, exptokseq, tokenImage);
break; retval += add_escapes(tok.image); tok = tok.next;
private void loadImports(ProtoDescriptor proto, File protoDir) { LinkedHashMap<String,ProtoDescriptor> children = new LinkedHashMap<String,ProtoDescriptor>(); for (String imp : proto.getImports()) { File file = new File(protoDir, imp); for (int i = 0; i < path.length && !file.exists(); i++) { file = new File(path[i], imp); } if ( !file.exists() ) { errors.add("Cannot load import: "+imp); } FileInputStream is=null; try { is = new FileInputStream(file); ProtoParser parser = new ProtoParser(is); ProtoDescriptor child = parser.ProtoDescriptor(); child.setName(file.getName()); loadImports(child, file.getParentFile()); children.put(imp, child); } catch (ParseException e) { errors.add("Failed to parse: "+file.getPath()+":"+e.getMessage()); } catch (FileNotFoundException e) { errors.add("Failed to open: "+file.getPath()+":"+e.getMessage()); } finally { try { is.close(); } catch (Throwable ignore){} } } proto.setImportProtoDescriptors(children); }
exptokseq[i] = (int[])jj_expentries.elementAt(i); return new ParseException(token, exptokseq, tokenImage);
private void loadImports(ProtoDescriptor proto, File protoDir) { LinkedHashMap<String,ProtoDescriptor> children = new LinkedHashMap<String,ProtoDescriptor>(); for (String imp : proto.getImports()) { File file = new File(protoDir, imp); for (int i = 0; i < path.length && !file.exists(); i++) { file = new File(path[i], imp); } if ( !file.exists() ) { errors.add("Cannot load import: "+imp); } FileInputStream is=null; try { is = new FileInputStream(file); ProtoParser parser = new ProtoParser(is); ProtoDescriptor child = parser.ProtoDescriptor(); child.setName(file.getName()); loadImports(child, file.getParentFile()); children.put(imp, child); } catch (ParseException e) { errors.add("Failed to parse: "+file.getPath()+":"+e.getMessage()); } catch (FileNotFoundException e) { errors.add("Failed to open: "+file.getPath()+":"+e.getMessage()); } finally { try { is.close(); } catch (Throwable ignore){} } } proto.setImportProtoDescriptors(children); }
break; retval += add_escapes(tok.image); tok = tok.next;
exptokseq[i] = (int[])jj_expentries.elementAt(i); return new ParseException(token, exptokseq, tokenImage);
private void loadImports(ProtoDescriptor proto, File protoDir) { LinkedHashMap<String,ProtoDescriptor> children = new LinkedHashMap<String,ProtoDescriptor>(); for (String imp : proto.getImports()) { File file = new File(protoDir, imp); for (int i = 0; i < path.length && !file.exists(); i++) { file = new File(path[i], imp); } if ( !file.exists() ) { errors.add("Cannot load import: "+imp); } FileInputStream is=null; try { is = new FileInputStream(file); ProtoParser parser = new ProtoParser(is); ProtoDescriptor child = parser.ProtoDescriptor(); child.setName(file.getName()); loadImports(child, file.getParentFile()); children.put(imp, child); } catch (ParseException e) { errors.add("Failed to parse: "+file.getPath()+":"+e.getMessage()); } catch (FileNotFoundException e) { errors.add("Failed to open: "+file.getPath()+":"+e.getMessage()); } finally { try { is.close(); } catch (Throwable ignore){} } } proto.setImportProtoDescriptors(children); }
break; retval += add_escapes(tok.image); tok = tok.next;
return TextFormat.unescapeText(token.image.substring(1, token.image.length()-1)); } catch (InvalidEscapeSequence e) { throw new ParseException("Invalid string litteral at line " + token.next.beginLine + ", column " + token.next.beginColumn+": "+e.getMessage());
private void loadImports(ProtoDescriptor proto, File protoDir) { LinkedHashMap<String,ProtoDescriptor> children = new LinkedHashMap<String,ProtoDescriptor>(); for (String imp : proto.getImports()) { File file = new File(protoDir, imp); for (int i = 0; i < path.length && !file.exists(); i++) { file = new File(path[i], imp); } if ( !file.exists() ) { errors.add("Cannot load import: "+imp); } FileInputStream is=null; try { is = new FileInputStream(file); ProtoParser parser = new ProtoParser(is); ProtoDescriptor child = parser.ProtoDescriptor(); child.setName(file.getName()); loadImports(child, file.getParentFile()); children.put(imp, child); } catch (ParseException e) { errors.add("Failed to parse: "+file.getPath()+":"+e.getMessage()); } catch (FileNotFoundException e) { errors.add("Failed to open: "+file.getPath()+":"+e.getMessage()); } finally { try { is.close(); } catch (Throwable ignore){} } } proto.setImportProtoDescriptors(children); }
return TextFormat.unescapeText(token.image.substring(1, token.image.length()-1)); } catch (InvalidEscapeSequence e) { throw new ParseException("Invalid string litteral at line " + token.next.beginLine + ", column " + token.next.beginColumn+": "+e.getMessage());
private void loadImports(ProtoDescriptor proto, File protoDir) { LinkedHashMap<String,ProtoDescriptor> children = new LinkedHashMap<String,ProtoDescriptor>(); for (String imp : proto.getImports()) { File file = new File(protoDir, imp); for (int i = 0; i < path.length && !file.exists(); i++) { file = new File(path[i], imp); } if ( !file.exists() ) { errors.add("Cannot load import: "+imp); } FileInputStream is=null; try { is = new FileInputStream(file); ProtoParser parser = new ProtoParser(is); ProtoDescriptor child = parser.ProtoDescriptor(); child.setName(file.getName()); loadImports(child, file.getParentFile()); children.put(imp, child); } catch (ParseException e) { errors.add("Failed to parse: "+file.getPath()+":"+e.getMessage()); } catch (FileNotFoundException e) { errors.add("Failed to open: "+file.getPath()+":"+e.getMessage()); } finally { try { is.close(); } catch (Throwable ignore){} } } proto.setImportProtoDescriptors(children); }
return TextFormat.unescapeText(token.image.substring(1, token.image.length()-1)); } catch (InvalidEscapeSequence e) { throw new ParseException("Invalid string litteral at line " + token.next.beginLine + ", column " + token.next.beginColumn+": "+e.getMessage());
private void loadImports(ProtoDescriptor proto, File protoDir) { LinkedHashMap<String,ProtoDescriptor> children = new LinkedHashMap<String,ProtoDescriptor>(); for (String imp : proto.getImports()) { File file = new File(protoDir, imp); for (int i = 0; i < path.length && !file.exists(); i++) { file = new File(path[i], imp); } if ( !file.exists() ) { errors.add("Cannot load import: "+imp); } FileInputStream is=null; try { is = new FileInputStream(file); ProtoParser parser = new ProtoParser(is); ProtoDescriptor child = parser.ProtoDescriptor(); child.setName(file.getName()); loadImports(child, file.getParentFile()); children.put(imp, child); } catch (ParseException e) { errors.add("Failed to parse: "+file.getPath()+":"+e.getMessage()); } catch (FileNotFoundException e) { errors.add("Failed to open: "+file.getPath()+":"+e.getMessage()); } finally { try { is.close(); } catch (Throwable ignore){} } } proto.setImportProtoDescriptors(children); }
final public String Rule() throws ParseException { Token t; switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case REQURIED: t = jj_consume_token(REQURIED); break; case OPTIONAL: t = jj_consume_token(OPTIONAL); break; case REPEATED: t = jj_consume_token(REPEATED); break; default: jj_la1[21] = jj_gen; jj_consume_token(-1); throw new ParseException(); } {if (true) return t.image;} throw new Error("Missing return statement in function"); }
errors.add("Failed to open: "+file.getPath()+":"+e.getMessage()); } catch (ParseException e) { errors.add("Failed to parse: "+file.getPath()+":"+e.getMessage()); } finally { try { is.close(); } catch (Throwable ignore){}
final public String Rule() throws ParseException { Token t; switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case REQURIED: t = jj_consume_token(REQURIED); break; case OPTIONAL: t = jj_consume_token(OPTIONAL); break; case REPEATED: t = jj_consume_token(REPEATED); break; default: jj_la1[21] = jj_gen; jj_consume_token(-1); throw new ParseException(); } {if (true) return t.image;} throw new Error("Missing return statement in function"); }
errors.add("Failed to open: "+file.getPath()+":"+e.getMessage()); } catch (ParseException e) { errors.add("Failed to parse: "+file.getPath()+":"+e.getMessage()); } finally { try { is.close(); } catch (Throwable ignore){}
final public String Rule() throws ParseException { Token t; switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case REQURIED: t = jj_consume_token(REQURIED); break; case OPTIONAL: t = jj_consume_token(OPTIONAL); break; case REPEATED: t = jj_consume_token(REPEATED); break; default: jj_la1[21] = jj_gen; jj_consume_token(-1); throw new ParseException(); } {if (true) return t.image;} throw new Error("Missing return statement in function"); }