diff options
Diffstat (limited to 'libstorycode/storycode.l')
-rw-r--r-- | libstorycode/storycode.l | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libstorycode/storycode.l b/libstorycode/storycode.l index 18cd95a..cadd771 100644 --- a/libstorycode/storycode.l +++ b/libstorycode/storycode.l @@ -45,6 +45,7 @@ %s sqb %x stringesc %x runtext +%x prerun %s image %s image_filename @@ -86,7 +87,8 @@ BGCOL { BEGIN(col); return SC_BGCOL; } lineno++; return SC_FILENAME; } -<INITIAL>:[ ] { BEGIN(runtext); return SC_TEXT_START; } +<INITIAL>: { BEGIN(prerun); return SC_TEXT_START; } +<prerun>[ ] { BEGIN(runtext); } <runtext>[\\] { BEGIN(stringesc); } <stringesc>. { sclval.str = strdup(yytext); BEGIN(runtext); return SC_RUN_TEXT; } <runtext>[\*] { return '*'; } @@ -96,6 +98,7 @@ BGCOL { BEGIN(col); return SC_BGCOL; } sclval.str[yyleng] = '\0'; return SC_RUN_TEXT; } <runtext>\n { BEGIN(0); lineno++; } +<prerun>\n { BEGIN(0); lineno++; } \n { BEGIN(0); lineno++; } |