Codota Logo
JNAeratorParser
Code IndexAdd Codota to your IDE (free)

How to use
JNAeratorParser
in
com.ochafik.lang.jnaerator

Best Java code snippets using com.ochafik.lang.jnaerator.JNAeratorParser (Showing top 15 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Charset c =
  • Codota IconString charsetName;Charset.forName(charsetName)
  • Codota IconCharset.defaultCharset()
  • Codota IconContentType contentType;contentType.getCharset()
  • Smart code suggestions by Codota
}
origin: nativelibs4java/JavaCL

@Override
protected com.ochafik.lang.jnaerator.parser.ObjCppParser newObjCppParser(TypeConversion typeConverter, String s, boolean verbose, PrintStream errorOut) throws IOException {
  com.ochafik.lang.jnaerator.parser.ObjCppParser parser = super.newObjCppParser(typeConverter, s, verbose, errorOut);
  parser.allowKinds(ModifierKind.OpenCL);
  return parser;
}

origin: nativelibs4java/JNAerator

static List<Declaration> parseDeclarations(String source) throws IOException, LexerException, InterruptedException {
  JNAeratorConfig config = new JNAeratorConfig();
  JNAeratorConfigUtils.autoConfigure(config);
  //config.noCPlusPlus = true;
  config.preprocessorConfig.includeStrings.add(source);
  Result result = new Result(config, null, null);
  SourceFiles parse = new JNAeratorParser().parse(config, result.typeConverter, null);
  List<Declaration> ret = new ArrayList<Declaration>();
  flatten(parse, ret);
  return ret;
}
origin: com.nativelibs4java/jnaerator

Expression expression = new JNAeratorParser().newObjCppParser(typeConverter, preprocessedMacro, verbose, null).expression();//.expr;
if (expression == null) {
  continue;
origin: nativelibs4java/JNAerator

  sourceContent = removeInlineAsm(sourceContent);
    Future<SourceFile> fut = executor.submit(createParsingCallable(config, typeConverter, sourceContent, topLevelTypeDefs, true));
    try {
      sourceFiles.add(fut.get(config.fullParsingTimeout, TimeUnit.MILLISECONDS));
      return removeTypeDefsConflictingWithForcedTypeDefs(sourceFiles, topLevelTypeDefs);
    } catch (Throwable ex) {
      ex.printStackTrace();
  List<Slice> slices = cutSourceContentInSlices(sourceContent, System.out);
  if (config.verbose) {
    System.out.println("Now parsing " + slices.size() + " slices");
  for (Slice slice : slices) {
    try {
      sourceFiles.add(executor.submit(createParsingCallable(config, typeConverter, slice.text, topLevelTypeDefs, false)).get(config.sliceParsingTimeout, TimeUnit.MILLISECONDS));
    } catch (Throwable ex) {
      if (firstFailure) {
  return removeTypeDefsConflictingWithForcedTypeDefs(sourceFiles, topLevelTypeDefs);
} finally {
  executor.shutdown();
origin: nativelibs4java/JNAerator

public SourceFiles parseSources(Feedback feedback, TypeConversion typeConverter) throws IOException, LexerException {
  feedback.setStatus("Parsing native headers...");
  return createJNAeratorParser().parse(config, typeConverter, null);
}
origin: nativelibs4java/JNAerator

protected JNAeratorParser createJNAeratorParser() {
  return new JNAeratorParser();
}
origin: nativelibs4java/JNAerator

Expression expression = new JNAeratorParser().newObjCppParser(typeConverter, preprocessedMacro, verbose, null).expression();//.expr;
if (expression == null) {
  continue;
origin: com.nativelibs4java/jnaerator

  sourceContent = removeInlineAsm(sourceContent);
    Future<SourceFile> fut = executor.submit(createParsingCallable(config, typeConverter, sourceContent, topLevelTypeDefs, true));
    try {
      sourceFiles.add(fut.get(config.fullParsingTimeout, TimeUnit.MILLISECONDS));
      return removeTypeDefsConflictingWithForcedTypeDefs(sourceFiles, topLevelTypeDefs);
    } catch (Throwable ex) {
      ex.printStackTrace();
  List<Slice> slices = cutSourceContentInSlices(sourceContent, System.out);
  if (config.verbose) {
    System.out.println("Now parsing " + slices.size() + " slices");
  for (Slice slice : slices) {
    try {
      sourceFiles.add(executor.submit(createParsingCallable(config, typeConverter, slice.text, topLevelTypeDefs, false)).get(config.sliceParsingTimeout, TimeUnit.MILLISECONDS));
    } catch (Throwable ex) {
      if (firstFailure) {
  return removeTypeDefsConflictingWithForcedTypeDefs(sourceFiles, topLevelTypeDefs);
} finally {
  executor.shutdown();
origin: com.nativelibs4java/jnaerator

public SourceFiles parseSources(Feedback feedback, TypeConversion typeConverter) throws IOException, LexerException {
  feedback.setStatus("Parsing native headers...");
  return createJNAeratorParser().parse(config, typeConverter, null);
}
origin: com.nativelibs4java/jnaerator

protected JNAeratorParser createJNAeratorParser() {
  return new JNAeratorParser();
}
origin: nativelibs4java/JNAerator

public TypeRef parseType(Node node) throws XPathExpressionException, RecognitionException, IOException {
  if (node == null) {
    return null;
  }
  TypeRef declaredType = null;
  try {
    String dt = XMLUtils.getAttribute(node, "declared_type");
    if (dt != null) {
      ObjCppParser parser = new JNAeratorParser().newObjCppParser(result.typeConverter, dt, false, null);
      parser.setupScopes();
      declaredType = parser.mutableTypeRef();
    }
  } catch (Exception ex) {
    ex.printStackTrace();
  }
  TypeRef inferredType = null;
  if (declaredType == null || declaredType instanceof SimpleTypeRef) {
    inferredType = parseAndReconciliateType(XMLUtils.getAttribute(node, "type"), XMLUtils.getAttribute(node, "type64"));
    if (inferredType != null && declaredType instanceof SimpleTypeRef && !inferredType.toString().equals(declaredType.toString())) {
      String sn = ((SimpleTypeRef) declaredType).getName().toString();
      result.addWeakTypeDef(inferredType.clone(), sn);
    }
  }
  return declaredType != null ? declaredType : inferredType;
}
origin: nativelibs4java/JNAerator

ObjCppParser parser = newObjCppParser(typeConverter, source, config.verbose, pout);
if (topLevelTypeDefs != null) {
  parser.topLevelTypeIdentifiers = topLevelTypeDefs;
origin: com.nativelibs4java/jnaerator

static List<Declaration> parseDeclarations(String source) throws IOException, LexerException, InterruptedException {
  JNAeratorConfig config = new JNAeratorConfig();
  JNAeratorConfigUtils.autoConfigure(config);
  //config.noCPlusPlus = true;
  config.preprocessorConfig.includeStrings.add(source);
  Result result = new Result(config, null, null);
  SourceFiles parse = new JNAeratorParser().parse(config, result.typeConverter, null);
  List<Declaration> ret = new ArrayList<Declaration>();
  flatten(parse, ret);
  return ret;
}
origin: com.nativelibs4java/jnaerator

public TypeRef parseType(Node node) throws XPathExpressionException, RecognitionException, IOException {
  if (node == null) {
    return null;
  }
  TypeRef declaredType = null;
  try {
    String dt = XMLUtils.getAttribute(node, "declared_type");
    if (dt != null) {
      ObjCppParser parser = new JNAeratorParser().newObjCppParser(result.typeConverter, dt, false, null);
      parser.setupScopes();
      declaredType = parser.mutableTypeRef();
    }
  } catch (Exception ex) {
    ex.printStackTrace();
  }
  TypeRef inferredType = null;
  if (declaredType == null || declaredType instanceof SimpleTypeRef) {
    inferredType = parseAndReconciliateType(XMLUtils.getAttribute(node, "type"), XMLUtils.getAttribute(node, "type64"));
    if (inferredType != null && declaredType instanceof SimpleTypeRef && !inferredType.toString().equals(declaredType.toString())) {
      String sn = ((SimpleTypeRef) declaredType).getName().toString();
      result.addWeakTypeDef(inferredType.clone(), sn);
    }
  }
  return declaredType != null ? declaredType : inferredType;
}
origin: com.nativelibs4java/jnaerator

ObjCppParser parser = newObjCppParser(typeConverter, source, config.verbose, pout);
if (topLevelTypeDefs != null) {
  parser.topLevelTypeIdentifiers = topLevelTypeDefs;
com.ochafik.lang.jnaeratorJNAeratorParser

Most used methods

  • newObjCppParser
  • <init>
  • createParsingCallable
  • cutSourceContentInSlices
  • parse
  • removeInlineAsm
  • removeTypeDefsConflictingWithForcedTypeDefs

Popular in Java

  • Making http requests using okhttp
  • onCreateOptionsMenu (Activity)
  • getExternalFilesDir (Context)
  • getResourceAsStream (ClassLoader)
    Returns a stream for the resource with the specified name. See #getResource(String) for a descriptio
  • FileReader (java.io)
    A specialized Reader that reads from a file in the file system. All read requests made by calling me
  • FileWriter (java.io)
    Convenience class for writing character files. The constructors of this class assume that the defaul
  • BigDecimal (java.math)
    An immutable arbitrary-precision signed decimal.A value is represented by an arbitrary-precision "un
  • List (java.util)
    A List is a collection which maintains an ordering for its elements. Every element in the List has a
  • Map (java.util)
    A Map is a data structure consisting of a set of keys and values in which each key is mapped to a si
  • LogFactory (org.apache.commons.logging)
    A minimal incarnation of Apache Commons Logging's LogFactory API, providing just the common Log look
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now