diff options
author | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-07-26 11:06:09 +0000 |
---|---|---|
committer | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-07-26 11:06:09 +0000 |
commit | f2a19d9971bb076f4a80a9e41ba601bc862d0fdf (patch) | |
tree | be553fe84132e1f25d5f33fb98f703378096b961 /crawl-ref/source/util/levcomp.ypp | |
parent | bc1a54904787e2f4779a99f2be1f72f6fd87679b (diff) | |
download | crawl-ref-f2a19d9971bb076f4a80a9e41ba601bc862d0fdf.tar.gz crawl-ref-f2a19d9971bb076f4a80a9e41ba601bc862d0fdf.zip |
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
Diffstat (limited to 'crawl-ref/source/util/levcomp.ypp')
-rw-r--r-- | crawl-ref/source/util/levcomp.ypp | 27 |
1 files changed, 21 insertions, 6 deletions
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; } ; |