From 42b06297f2e311057c1dea19d5c14cc44e126da6 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Sat, 6 Apr 2019 22:46:16 +0200 Subject: Parsing fixes --- libstorycode/storycode.l | 2 +- libstorycode/storycode.y | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/libstorycode/storycode.l b/libstorycode/storycode.l index e7f3961..9a247cd 100644 --- a/libstorycode/storycode.l +++ b/libstorycode/storycode.l @@ -55,7 +55,7 @@ GEOMETRY { BEGIN(geom); return SC_GEOMETRY; } TEXT { return SC_TEXTFRAME; } IMAGE { return SC_IMAGEFRAME; } FOOTER { return SC_FOOTER; } -FONT { BEGIN(font); return SC_FONT; } +FONT[ ] { BEGIN(font); return SC_FONT; } PAD { BEGIN(pad); return SC_PAD; } PARASPACE { BEGIN(paraspace); return SC_PARASPACE; } ALIGN { BEGIN(align); return SC_ALIGN; } diff --git a/libstorycode/storycode.y b/libstorycode/storycode.y index d2508e2..4e3c6d0 100644 --- a/libstorycode/storycode.y +++ b/libstorycode/storycode.y @@ -106,12 +106,10 @@ ctx->ss = stylesheet_new(); ctx->s = slide_new(); - ctx->n_str = 0; ctx->max_str = 32; ctx->str = malloc(ctx->max_str*sizeof(char *)); if ( ctx->str == NULL ) ctx->max_str = 0; - - ctx->mask = 0; + str_reset(ctx); } %{ -- cgit v1.2.3