[ClangAstParser] Disables parallel parsing in MonolithicCodeParser
package pt.up.fe.specs.clang.codeparser;
import java.io.File;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.HashSet;
import java.util.List;
import java.util.Map;
-import java.util.Map.Entry;
-import java.util.Set;
import java.util.stream.Collectors;
-import org.suikasoft.jOptions.Interfaces.DataStore;
-
import pt.up.fe.specs.clang.ClangAstParser;
import pt.up.fe.specs.clang.ast.genericnode.ClangRootNode;
import pt.up.fe.specs.clang.clavaparser.ClavaParser;
import pt.up.fe.specs.clang.streamparserv2.ClangDumperParser;
-import pt.up.fe.specs.clang.textparser.TextParser;
-import pt.up.fe.specs.clang.transforms.TreeTransformer;
-import pt.up.fe.specs.clava.ClavaOptions;
-import pt.up.fe.specs.clava.ast.LegacyToDataStore;
import pt.up.fe.specs.clava.ast.extra.App;
-import pt.up.fe.specs.clava.ast.extra.TranslationUnit;
-import pt.up.fe.specs.clava.language.Standard;
import pt.up.fe.specs.clava.utils.SourceType;
import pt.up.fe.specs.util.SpecsIo;
import pt.up.fe.specs.util.SpecsLogs;
@@ -199,6 +185,7 @@ public class MonolithicCodeParser {
* @param compilerOptions
* @return
*/
+ /*
public App parseParallel(List<File> sources, List<String> compilerOptions) {
List<File> allSourceFolders = getInputSourceFolders(sources, compilerOptions);
@@ -291,41 +278,9 @@ public class MonolithicCodeParser {
// }
//
// return clavaAst;
- /*
-
-
-
- if (showClangDump) {
- SpecsLogs.msgInfo("Clang Dump:\n" + SpecsIo.read(new File(ClangAstParser.getClangDumpFilename())));
- }
-
- if (showClangAst) {
- SpecsLogs.msgInfo("Clang AST:\n" + ast);
- }
-
- // Parse dump information
- try (ClavaParser clavaParser = new ClavaParser(ast)) {
- App clavaAst = clavaParser.parse();
- clavaAst.setSourcesFromStrings(allFiles);
- clavaAst.addConfig(ast.getConfig());
-
- if (showClavaAst) {
- SpecsLogs.msgInfo("CLAVA AST:\n" + clavaAst.toTree());
- }
-
- if (showCode) {
- SpecsLogs.msgInfo("Code:\n" + clavaAst.getCode());
- }
-
- return clavaAst;
-
- } catch (Exception e) {
- throw new RuntimeException(e);
}
*/
-
- }
-
+ /*
private void adaptOptions(DataStore options, File source) {
// Check if the standard is compatible with the file type
Standard standard = options.getTry(ClavaOptions.STANDARD).orElse(null);
@@ -340,7 +295,7 @@ public class MonolithicCodeParser {
}
}
-
+ */
/**
* Collects all source folders, taking into account given sources to compile, and include folders in flags.
*
@@ -348,6 +303,7 @@ public class MonolithicCodeParser {
* @param parserOptions
* @return
*/
+ /*
private List<File> getInputSourceFolders(List<File> sources, List<String> parserOptions) {
Set<File> sourceFolders = new HashSet<>();
@@ -391,5 +347,6 @@ public class MonolithicCodeParser {
return orderedSources;
}
+ */
}
\ No newline at end of file
