From a38c9405313dceae0f62c965fb99ae69b06b0548 Mon Sep 17 00:00:00 2001 From: Alex Merry Date: Fri, 22 Mar 2013 19:43:54 +0000 Subject: Anchors can have spaces in them Parse anchors with spaces, like (3.north west). --- tikzit/src/common/tikzparser.ym | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tikzit/src/common/tikzparser.ym b/tikzit/src/common/tikzparser.ym index 9f03745..2277e23 100644 --- a/tikzit/src/common/tikzparser.ym +++ b/tikzit/src/common/tikzparser.ym @@ -70,6 +70,7 @@ extern void yyerror(const char *str); %type nodename %type anchor +%type anchorsym %type optanchor %type nodeid %type coords @@ -147,7 +148,13 @@ nodelabel: [n setLabel:$1]; } -anchor: LWORD { $$ = $1; } | NATURALNUMBER { $$ = $1; }; +anchor: anchorsym { $$ = $1; } + | anchor anchorsym + { + NSString *s = [$1 stringByAppendingFormat:@" %@", $2]; + $$ = s; + }; +anchorsym: LWORD { $$ = $1; } | NATURALNUMBER { $$ = $1; }; optanchor: { $$ = @""; } | FULLSTOP anchor { $$ = $2; }; -- cgit v1.2.3