summaryrefslogtreecommitdiff
path: root/tikzit/src
diff options
context:
space:
mode:
authorAlex Merry <alex.merry@cs.ox.ac.uk>2013-02-04 18:35:27 +0000
committerAlex Merry <alex.merry@cs.ox.ac.uk>2013-02-04 18:35:27 +0000
commitb76214910fb290fa711be2a156079717f477a068 (patch)
treeeab15231c955dea05dfee4c8ed0ebf309a649a56 /tikzit/src
parentdc720cc5d5e3f5b2f3d8119947a9dd8c69f4b2df (diff)
Fix parsing of keywords in property names and values
Keywords like "rectangle" and "at" were not allowed unquoted by the parser, but would not be quoted by the generator. Fixes: #10
Diffstat (limited to 'tikzit/src')
-rw-r--r--tikzit/src/common/tikzparser.ym7
1 files changed, 6 insertions, 1 deletions
diff --git a/tikzit/src/common/tikzparser.ym b/tikzit/src/common/tikzparser.ym
index 26f0e0d..cdbdb88 100644
--- a/tikzit/src/common/tikzparser.ym
+++ b/tikzit/src/common/tikzparser.ym
@@ -119,7 +119,12 @@ propsyms:
propsym:
LWORD { $$ = $<nsstr>1; }
- | number { $$ = $<nsstr>1; };
+ | number { $$ = $<nsstr>1; }
+ | TO { $$ = @"to"; }
+ | NODE { $$ = @"node"; }
+ | RECTANGLE { $$ = @"rectangle"; }
+ | AT { $$ = @"at"; }
+ | FULLSTOP { $$ = @"."; };
nodecmd : NODE { [[TikzGraphAssembler currentAssembler] prepareNode]; };