summaryrefslogtreecommitdiff
path: root/tikzit/src/common/TikzGraphAssembler.h
diff options
context:
space:
mode:
authorAlex Merry <dev@randomguy3.me.uk>2013-03-23 03:30:19 +0000
committerAlex Merry <dev@randomguy3.me.uk>2013-03-23 03:38:55 +0000
commit8cde489ab6c4169fb03d810447c18eea0d0eaa14 (patch)
treead3fcdc71f1819963198ae8a52fc5f2b2818cd20 /tikzit/src/common/TikzGraphAssembler.h
parente68a44b882e5d6dbbab769f7ef20355ec53a9278 (diff)
Make the parser/lexer reentrant
No more locking! Also, the interface for TikzGraphAssembler is much simpler. Changes to OSX code are completely untested.
Diffstat (limited to 'tikzit/src/common/TikzGraphAssembler.h')
-rw-r--r--tikzit/src/common/TikzGraphAssembler.h23
1 files changed, 9 insertions, 14 deletions
diff --git a/tikzit/src/common/TikzGraphAssembler.h b/tikzit/src/common/TikzGraphAssembler.h
index 3fc4e9e..16fdf7f 100644
--- a/tikzit/src/common/TikzGraphAssembler.h
+++ b/tikzit/src/common/TikzGraphAssembler.h
@@ -26,24 +26,19 @@
@interface TikzGraphAssembler : NSObject {
Graph *graph;
+ void *scanner;
NSMutableDictionary *nodeMap;
NSError *lastError;
+ char linebuff[500];
+ int lineno;
+ size_t tokenpos;
}
-@property (readonly) Graph *graph;
-@property (readonly) NSError *lastError;
-
-- (BOOL)parseTikz:(NSString*)tikz;
-- (BOOL)parseTikz:(NSString*)tikz forGraph:(Graph*)gr;
-
-- (BOOL)testTikz:(NSString*)tikz;
-
-- (void)invalidate;
-- (void)invalidateWithError:(NSError*)error;
-
-+ (void)setup;
-+ (TikzGraphAssembler*)currentAssembler;
-+ (TikzGraphAssembler*)assembler;
++ (BOOL) parseTikz:(NSString*)tikz forGraph:(Graph*)gr error:(NSError**)e;
++ (BOOL) parseTikz:(NSString*)tikz forGraph:(Graph*)gr;
++ (Graph*) parseTikz:(NSString*)tikz error:(NSError**)e;
++ (Graph*) parseTikz:(NSString*)tikz;
++ (BOOL)validateTikzPropertyNameOrValue:(NSString*)tikz;
@end