public final HashMap<File, EntryConstruct> entryMap;
public final HashSet<String> headerFiles;
-
- // In the generated header file, we need to forward the user-defined
+
+ // In the generated header file, we need to forward the user-defined
public final HashSet<String> forwardClass;
private GlobalConstruct globalConstruct;
forwardClass = new HashSet<String>();
globalConstruct = null;
}
-
+
private void addDefineConstruct(DefineConstruct construct) {
- ArrayList<DefineConstruct> list = defineListMap
- .get(construct.file);
+ ArrayList<DefineConstruct> list = defineListMap.get(construct.file);
if (list == null) {
list = new ArrayList<DefineConstruct>();
defineListMap.put(construct.file, list);
// -1 means the curl symbols in the interface do not match
return -1;
}
-
+
/**
* <p>
* A sub-routine to extract the define construct. When called, we have
* @throws IOException
* @throws ParseException
*/
- private void extractDefineConstruct(File file,
- LineNumberReader lineReader, String curLine, int beginLineNum)
- throws WrongAnnotationException, IOException, ParseException {
+ private void extractDefineConstruct(File file, LineNumberReader lineReader,
+ String curLine, int beginLineNum) throws WrongAnnotationException,
+ IOException, ParseException {
ArrayList<String> annotations = extractTillConstructEnd(file,
lineReader, curLine, beginLineNum);
int endLineNum = lineReader.getLineNumber();
- DefineConstruct construct = new DefineConstruct(file,
- beginLineNum, endLineNum, annotations);
+ DefineConstruct construct = new DefineConstruct(file, beginLineNum,
+ endLineNum, annotations);
addDefineConstruct(construct);
}
-
/**
* <p>
line = lineReader.readLine();
lineNum = lineReader.getLineNumber();
construct.processFunctionDeclaration(line);
-
+
// Record those user-defined struct
// RET
String returnType = construct.getFunctionHeader().returnType;
if (SpecUtils.isUserDefinedStruct(decl.type))
forwardClass.add(SpecUtils.getPlainType(decl.type));
}
-
+
} catch (IOException e) {
errMsg = "Spec error in file \""
+ file.getName()
extractEntryConstruct(file, beginLineNum, curLine);
else if (name.equals("OPDefine") || name.equals("PotentialOP")
|| name.equals("OPCheck") || name.equals("OPClear")
- || name.equals("OPClearDefine"))
+ || name.equals("OPClearDefine")
+ || name.equals("OPDefineUnattached")
+ || name.equals("OPClearDefineUnattached"))
extractOPConstruct(file, beginLineNum, curLine,
OPType.valueOf(name));
}