diff --git a/Modules/Debuggers/ProjectCenter/GDBWrapper.h b/Modules/Debuggers/ProjectCenter/GDBWrapper.h index a672ceb..447ffc4 100644 --- a/Modules/Debuggers/ProjectCenter/GDBWrapper.h +++ b/Modules/Debuggers/ProjectCenter/GDBWrapper.h @@ -77,4 +77,20 @@ typedef enum PCDebuggerOutputType_enum { - (void) putChar:(unichar)ch; +// methods for a look-ahead recursive parser which attempts to parse +// gdb's output to a Dictionary/Array structure representable in a plist + +// LAR parser - single string element (-> NSString value) +- (NSString *) parseString: (NSScanner *)scanner; + +// LAR parser - array element (-> NSArray value) +- (NSArray *) parseArray: (NSScanner *)scanner; + +// LAR parser - key-value list (-> NSDictionary value) +- (NSDictionary *) parseKeyValue: (NSScanner *)scanner; + +// parses a single line from the debugger or the machine interface +// it splits out the type then recurses in the LAR methods +- (PCDebuggerOutputTypes) parseStringLine: (NSString *)stringInput; + @end diff --git a/Modules/Debuggers/ProjectCenter/GDBWrapper.m b/Modules/Debuggers/ProjectCenter/GDBWrapper.m index d9f6a0b..f8d7f7a 100644 --- a/Modules/Debuggers/ProjectCenter/GDBWrapper.m +++ b/Modules/Debuggers/ProjectCenter/GDBWrapper.m @@ -167,6 +167,8 @@ [tView setNeedsDisplay:YES]; } +/* == parsing methods == */ + - (NSString *) parseString: (NSScanner *)scanner { NSString *str; @@ -566,6 +568,8 @@ } } +/* == end of parsing methods */ + /** * Log standard out. */