summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/util
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-12-30 16:39:42 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-12-30 16:39:42 +0000
commit7ee9932cc77c18c3abed12faa7f23dfea7db023f (patch)
treecbdb705b8ab3b76a572160a1dc33c1a2d17179f1 /crawl-ref/source/util
parent0a390f673d1e6a76efc2eef6c23438692bb5270e (diff)
downloadcrawl-ref-7ee9932cc77c18c3abed12faa7f23dfea7db023f.tar.gz
crawl-ref-7ee9932cc77c18c3abed12faa7f23dfea7db023f.zip
Added new vaults (incl. Crypt, altars, entries). Contributed by Lemuel, bobbens, zaba.
Fixed level lexer to handle DOS-style line endings in .des files on Unix. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3159 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/util')
-rw-r--r--crawl-ref/source/util/levcomp.lpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/crawl-ref/source/util/levcomp.lpp b/crawl-ref/source/util/levcomp.lpp
index 4d7e0278bd..8812326257 100644
--- a/crawl-ref/source/util/levcomp.lpp
+++ b/crawl-ref/source/util/levcomp.lpp
@@ -101,20 +101,20 @@ NSPACE [^\ \t\r\n]
<MAPDEF>[ ]*\r?\n ;
-<LUA>\s*\}\}[ \t]*$ { BEGIN(INITIAL); }
-<LUA>[^\r\n]+\}\}[ \t]*$ {
+<LUA>\s*\}\}[ \t\r]*$ { BEGIN(INITIAL); }
+<LUA>[^\r\n]+\}\}[ \t\r]*$ {
settext(true, 2);
BEGIN(INITIAL);
return LUA_LINE;
}
<LUA>[^\r\n]+ {
- settext();
+ settext(true);
return LUA_LINE;
}
<LUA>\r?\n ;
-<LUA_ONELINER>[^\r\n]+$ {
- settext();
+<LUA_ONELINER>[^\r\n]+\r?$ {
+ settext(true);
return LUA_LINE;
}
<LUA_ONELINER>\r?\n { BEGIN(INITIAL); }
@@ -159,21 +159,21 @@ NSPACE [^\ \t\r\n]
<ARGUMENT>\r?\n { BEGIN(INITIAL); }
-<TOEOL>.*\\[ \t]*$ {
+<TOEOL>.*\\[ \t\r]*$ {
settext(true, 1);
return STRING;
}
<TOEOL>.+$ {
BEGIN(INITIAL);
- settext();
+ settext(true);
return STRING;
}
<TOEOL>\r?\n ;
^[ \t]*#.* ;
-^\s*MAP[ \t]*$ { BEGIN(MAPDEF); }
+^\s*MAP[ \t\r]*$ { BEGIN(MAPDEF); }
^[ \t]*: { BEGIN(LUA_ONELINER); return MAIN; }
@@ -221,6 +221,7 @@ KMASK: { BEGIN(ARGUMENT); return KMASK; }
[\ \t]+ ;
\r?\n ;
+\r ;
. return CHARACTER;
%%