diff options
author | Alex Merry <dev@randomguy3.me.uk> | 2013-03-23 03:30:19 +0000 |
---|---|---|
committer | Alex Merry <dev@randomguy3.me.uk> | 2013-03-23 03:38:55 +0000 |
commit | 8cde489ab6c4169fb03d810447c18eea0d0eaa14 (patch) | |
tree | ad3fcdc71f1819963198ae8a52fc5f2b2818cd20 /tikzit/src/common/TikzGraphAssembler.h | |
parent | e68a44b882e5d6dbbab769f7ef20355ec53a9278 (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.h | 23 |
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 |