Add the new information to the DocFile form the DocumentInfoGetter in the ProjectFileBuilder's
addSourceDocument method.
If the change is at the top level, you must modify the evaluateExpression method in this parser and add the
corresponding methods to the ProjectFileIR, ProjectFileIRImpl, and ProjectFileBuilder
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ONLY
public static final ProjectFileParser ONLY
- Singleton instance of ProjectFileParser
_parent
private String _parent
_srcFileBase
private String _srcFileBase
breakpointListVisitor
ProjectFileParser.BreakpointListVisitor breakpointListVisitor
bookmarkListVisitor
ProjectFileParser.BookmarkListVisitor bookmarkListVisitor
ProjectFileParser
private ProjectFileParser()
parse
public ProjectFileIR parse(File projFile)
throws IOException,
FileNotFoundException,
MalformedProjectFileException
- Overrides:
parse in class ProjectFileParserFacade
- Parameters:
projFile - the file to parse
- Returns:
- the project file IR
- Throws:
IOException
FileNotFoundException
MalformedProjectFileException
evaluateExpression
private void evaluateExpression(SEList e,
ProjectFileIR pfir,
ProjectFileParser.DocFileListVisitor flv)
throws IOException
- Given a top-level s-expression, this method checks the name of the node and configures the given pfir
appropriately. If the expression is empty, it is ignored.
- Parameters:
e - the top-level s-expression to checkpfir - the ProjectFileIR to update
- Throws:
IOException
parseFile
DocFile parseFile(SExp s,
String pathRoot)
- Parses out the labeled node (a non-empty list) into a DocFile. The node must have the "file" label on it.
- Parameters:
s - the non-empty list expression
- Returns:
- the DocFile described by this s-expression
parseFileName
private String parseFileName(SExp s)
parseInt
private int parseInt(SExp s)
parseIntPair
private Pair<Integer,Integer> parseIntPair(SExp s)
parseStringNode
private String parseStringNode(SExp n)
- Takes input of form "(str str)" and returns the second string.
parseBreakpoint
DebugBreakpointData parseBreakpoint(SExp s,
String pathRoot)
- Parses out the labeled node (a non-empty list) into a breakpoint. The node must have the "breakpoint" label on it.
- Parameters:
s - the non-empty list expression
- Returns:
- the breakpoint described by this s-expression
parseBookmark
FileRegion parseBookmark(SExp s,
String pathRoot)
- Parses out the labeled node (a non-empty list) into a bookmark. The node must have the "bookmark" label on it.
- Parameters:
s - the non-empty list expression
- Returns:
- the bookmark described by this s-expression