aboutsummaryrefslogtreecommitdiff
path: root/libstorycode/storycode.l
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.me.uk>2019-02-17 23:04:20 +0100
committerThomas White <taw@bitwiz.me.uk>2019-02-17 23:04:20 +0100
commit135cc1ef50930b86189be2303f68ab387ebf7f27 (patch)
tree862b828c73c44e0f5ed77ce035db855da15083f8 /libstorycode/storycode.l
parent6a31d8c2ba70c1a5342bc827091a2076e65fb2e0 (diff)
WIP on parser
Diffstat (limited to 'libstorycode/storycode.l')
-rw-r--r--libstorycode/storycode.l10
1 files changed, 8 insertions, 2 deletions
diff --git a/libstorycode/storycode.l b/libstorycode/storycode.l
index 663a4b1..f68026d 100644
--- a/libstorycode/storycode.l
+++ b/libstorycode/storycode.l
@@ -22,6 +22,12 @@
%{
#define YYDEBUG 1
+
+ #include "presentation.h"
+ #include "narrative.h"
+ #include "slide.h"
+ #include "stylesheet.h"
+
#include "storycode_parse.h"
%}
@@ -49,11 +55,11 @@ BGCOL { return SC_BGCOL; }
(?i:left) { return SC_LEFT; }
(?i:center) { return SC_CENTER; }
(?i:right) { return SC_RIGHT; }
-<string>.*\n { sclval = strdup(yytext); sclval[yyleng-1] = '\0'; BEGIN(0); return SC_STRING; }
+<string>.*\n { sclval.str = strdup(yytext); sclval.str[yyleng-1] = '\0'; BEGIN(0); return SC_STRING; }
"[" { return SC_SQOPEN; }
"]" { return SC_SQCLOSE; }
:[ ] { BEGIN(string); }
-:\n { sclval = strdup(""); return SC_STRING; }
+:\n { sclval.str = strdup(""); return SC_STRING; }
[{] { return SC_OPENBRACE; }
[}] { return SC_CLOSEBRACE; }
[.\n ] {}