Exemplo n.º 1
0
  public static CSource getCodeModelFromString(String str) {
    CSource code = new CSource();

    CParser cp = CParser.runParserFromString(str);
    Node rootNode = cp.getJjtree().rootNode();
    rootNode.dump("");
    setCSource(code, rootNode);

    runAdditionalTransfer(code);
    return code;
  }
Exemplo n.º 2
0
  public static CSource getCodeModelFromFile(String fileName) {
    CSource code = new CSource();

    CParser cp = CParser.runParserFromFile(fileName);
    Node rootNode = cp.getJjtree().rootNode();

    setPreprocessCCode(code, fileName);
    setCSource(code, rootNode);

    runAdditionalTransfer(code);
    return code;
  }