summaryrefslogtreecommitdiff
path: root/tikzit/src/common/TikzGraphAssembler+Parser.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+Parser.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+Parser.h')
-rw-r--r--tikzit/src/common/TikzGraphAssembler+Parser.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/tikzit/src/common/TikzGraphAssembler+Parser.h b/tikzit/src/common/TikzGraphAssembler+Parser.h
index 683e3e2..efceae9 100644
--- a/tikzit/src/common/TikzGraphAssembler+Parser.h
+++ b/tikzit/src/common/TikzGraphAssembler+Parser.h
@@ -25,9 +25,19 @@
#import "TikzGraphAssembler.h"
@interface TikzGraphAssembler (Parser)
+- (Graph*) graph;
/** Store a node so that it can be looked up by name later */
-- (void)addNodeToMap:(Node*)n;
-- (Node*)nodeWithName:(NSString*)name;
+- (void) addNodeToMap:(Node*)n;
+/** Get a previously-stored node by name */
+- (Node*) nodeWithName:(NSString*)name;
+- (void) newLineStarted:(char *)text;
+- (void) incrementPosBy:(size_t)amount;
+- (void) invalidateWithError:(const char *)message;
+- (void*) scanner;
@end
+#define YY_EXTRA_TYPE TikzGraphAssembler *
+#define YYLEX_PARAM [assembler scanner]
+void yyerror(TikzGraphAssembler *assembler, const char *str);
+
// vi:ft=objc:noet:ts=4:sts=4:sw=4