summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/util/levcomp.ypp
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref/source/util/levcomp.ypp')
-rw-r--r--crawl-ref/source/util/levcomp.ypp55
1 files changed, 53 insertions, 2 deletions
diff --git a/crawl-ref/source/util/levcomp.ypp b/crawl-ref/source/util/levcomp.ypp
index 199fb9e31b..614a357bbc 100644
--- a/crawl-ref/source/util/levcomp.ypp
+++ b/crawl-ref/source/util/levcomp.ypp
@@ -52,9 +52,10 @@ level_range set_range(const char *s, int start, int end)
/* Two harmless shift/reduce conflicts */
%expect 2
-%token <i> DEFAULT_DEPTH SHUFFLE SUBST TAGS KFEAT KITEM KMONS
+%token <i> DEFAULT_DEPTH SHUFFLE SUBST TAGS KFEAT KITEM KMONS KMASK
%token <i> NAME DEPTH ORIENT PLACE CHANCE MONS ITEM MARKER COLOUR
-%token <i> PRELUDE MAIN VALIDATE VETO NSUBST WELCOME
+%token <i> PRELUDE MAIN VALIDATE VETO NSUBST WELCOME LFLAGS BFLAGS
+%token <i> FLOORCOL ROCKCOL
%token <i> COMMA INTEGER CHARACTER
@@ -159,11 +160,16 @@ metaline : place
| subst
| nsubst
| colour
+ | floorcol
+ | rockcol
| shuffle
| tags
+ | lflags
+ | bflags
| kfeat
| kitem
| kmons
+ | kmask
| main_lua
| prelude_lua
| validate_lua
@@ -253,6 +259,15 @@ kitem : KITEM { }
quote_lua_string($2).c_str()));
}
+kmask : KMASK { }
+ | KMASK STRING
+ {
+ lc_map.main.add(
+ yylineno,
+ make_stringf("kmask(\"%s\")",
+ quote_lua_string($2).c_str()));
+ }
+
shuffle : SHUFFLE shuffle_specifiers {}
;
@@ -284,6 +299,24 @@ tagstring : STRING
}
;
+lflags : LFLAGS STRING
+ {
+ lc_map.main.add(
+ yylineno,
+ make_stringf("lflags(\"%s\")",
+ quote_lua_string($2).c_str()));
+ }
+ ;
+
+bflags : BFLAGS STRING
+ {
+ lc_map.main.add(
+ yylineno,
+ make_stringf("bflags(\"%s\")",
+ quote_lua_string($2).c_str()));
+ }
+ ;
+
marker : MARKER
{
lc_map.main.add(yylineno, "marker(");
@@ -316,6 +349,24 @@ mspec_segment : STRING
colour : COLOUR colour_specifiers { }
;
+floorcol : FLOORCOL { }
+ | FLOORCOL STRING
+ {
+ lc_map.main.add(
+ yylineno,
+ make_stringf("floor_colour(\"%s\")",
+ quote_lua_string($2).c_str()));
+ }
+
+rockcol : ROCKCOL { }
+ | ROCKCOL STRING
+ {
+ lc_map.main.add(
+ yylineno,
+ make_stringf("rock_colour(\"%s\")",
+ quote_lua_string($2).c_str()));
+ }
+
colour_specifiers : colour_specifier { }
| colour_specifiers COMMA colour_specifier { }
;