diff options
author | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-06-27 19:42:23 +0000 |
---|---|---|
committer | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-06-27 19:42:23 +0000 |
commit | 9b41135da821d07d54c7a6ee75ed6dcbd19e9322 (patch) | |
tree | b5151b3dd9d18dbfb50646ee91155382b22a2c59 /crawl-ref/source/util | |
parent | 6a2be1555b3d27614a7a5d3a8fd973cebc0865c8 (diff) | |
download | crawl-ref-9b41135da821d07d54c7a6ee75ed6dcbd19e9322.tar.gz crawl-ref-9b41135da821d07d54c7a6ee75ed6dcbd19e9322.zip |
Added glyphs_connected and friends for maps to test connectedness of points
after map transforms are applied.
Fixed conflicts in bison grammar.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1669 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/util')
-rw-r--r-- | crawl-ref/source/util/levcomp.lpp | 12 | ||||
-rw-r--r-- | crawl-ref/source/util/levcomp.ypp | 27 |
2 files changed, 11 insertions, 28 deletions
diff --git a/crawl-ref/source/util/levcomp.lpp b/crawl-ref/source/util/levcomp.lpp index 6df93afa7c..96331e45d1 100644 --- a/crawl-ref/source/util/levcomp.lpp +++ b/crawl-ref/source/util/levcomp.lpp @@ -183,7 +183,6 @@ KFEAT: { BEGIN(ARGUMENT); return KFEAT; } KITEM: { BEGIN(ARGUMENT); return KITEM; } KMONS: { BEGIN(ARGUMENT); return KMONS; } -- return DASH; , return COMMA; [0-9]+ { @@ -194,17 +193,6 @@ KMONS: { BEGIN(ARGUMENT); return KMONS; } [\ \t]+ ; \r?\n ; - -\( return OPAREN; -\) return CPAREN; - -\" return QUOTE; - -[a-zA-Z_][a-zA-Z_0-9]* { - settext(); - return IDENTIFIER; - } - . return CHARACTER; %% diff --git a/crawl-ref/source/util/levcomp.ypp b/crawl-ref/source/util/levcomp.ypp index aec084fb22..4a319c94f4 100644 --- a/crawl-ref/source/util/levcomp.ypp +++ b/crawl-ref/source/util/levcomp.ypp @@ -62,18 +62,17 @@ level_range set_range(const char *s, int start, int end) raw_range range; } -%token <i> BRANCHDEF BRANCH DESC DEFAULT +/* Two harmless shift/reduce conflicts */ +%expect 2 + %token <i> DEFAULT_DEPTH SHUFFLE SUBST TAGS KFEAT KITEM KMONS %token <i> NAME DEPTH ORIENT PLACE CHANCE MONS ITEM %token <i> PRELUDE MAIN VALIDATE VETO -%token <i> CHARACTER - -%token <i> DASH COMMA QUOTE OPAREN CPAREN -%token <i> INTEGER +%token <i> COMMA INTEGER CHARACTER %token <text> STRING MAP_LINE MONSTER_NAME ITEM_INFO -%token <text> IDENTIFIER LUA_LINE +%token <text> LUA_LINE %% @@ -124,12 +123,12 @@ level : name map_specs } ; -map_specs : /* nothing */ +map_specs : /* nothing */ { } | map_specs map_spec { } ; -map_spec : metalines { } - | map_def { } +map_spec : metaline { } + | map_def { } ; name : NAME STRING @@ -154,10 +153,6 @@ name : NAME STRING } ; -metalines : /* no metadata */ - | metalines metaline - ; - metaline : place | depth | chance @@ -176,7 +171,7 @@ metaline : place | veto_lua ; -global_lua : MAIN global_lua_lines { } +global_lua : MAIN global_lua_lines { } global_lua_lines : /* empty */ { } | global_lua_lines global_lua_line { } @@ -378,8 +373,8 @@ orientation : ORIENT {} map_def : map_lines ; -map_lines : map_line - | map_line map_lines +map_lines : map_lines map_line + | map_line ; map_line : MAP_LINE |