From f2a19d9971bb076f4a80a9e41ba601bc862d0fdf Mon Sep 17 00:00:00 2001 From: dshaligram Date: Thu, 26 Jul 2007 11:06:09 +0000 Subject: Replaced timed markers with Lua markers. Breaks save compatibility. KFEAT: feature names are now as in the dungeon_feature_type enum. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1930 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/util/levcomp.ypp | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) (limited to 'crawl-ref/source/util/levcomp.ypp') diff --git a/crawl-ref/source/util/levcomp.ypp b/crawl-ref/source/util/levcomp.ypp index 0da88b1ce1..10b74dcc04 100644 --- a/crawl-ref/source/util/levcomp.ypp +++ b/crawl-ref/source/util/levcomp.ypp @@ -15,6 +15,8 @@ int yylex(); extern int yylineno; +static bool start_marker_segment = false; + void yyerror(const char *e) { if (strstr(e, lc_desfile.c_str()) == e) @@ -280,19 +282,32 @@ tagstring : STRING } ; -marker : MARKER marker_specs { } +marker : MARKER + { + lc_map.main.add(yylineno, "marker("); + start_marker_segment = true; + } + marker_spec + { + lc_map.main.add(yylineno, ")"); + } ; -marker_specs : marker_spec { } - | marker_specs COMMA marker_spec { } +marker_spec : mspec_segments + +mspec_segments : /* nothing */ + | mspec_segments mspec_segment ; -marker_spec : ITEM_INFO +mspec_segment : STRING { lc_map.main.add( - yylineno, - make_stringf("marker(\"%s\")", + yylineno, + make_stringf( + "%s\"%s\"", + start_marker_segment? "" : " .. ", quote_lua_string($1).c_str())); + start_marker_segment = false; } ; -- cgit v1.2.3-54-g00ecf