diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-04-14 22:04:34 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-04-14 22:04:34 +0000 |
commit | 39f1638a065766fa67c70871c95a0a8400f044f1 (patch) | |
tree | 29de7d191f59b1c55842b25bee2f225e5de1b169 /crawl-ref/source/util/levcomp.lpp | |
parent | 1c7787b17cee82ed787ff5fed1eea5c943c0cd64 (diff) | |
download | crawl-ref-39f1638a065766fa67c70871c95a0a8400f044f1.tar.gz crawl-ref-39f1638a065766fa67c70871c95a0a8400f044f1.zip |
Apply Horst von Brand's (first) patch 1887488: gcc-4.3 compile failures.
I'm not sure what to do about the rest of that tracker item.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4233 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/util/levcomp.lpp')
-rw-r--r-- | crawl-ref/source/util/levcomp.lpp | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/crawl-ref/source/util/levcomp.lpp b/crawl-ref/source/util/levcomp.lpp index 8812326257..6247c611ca 100644 --- a/crawl-ref/source/util/levcomp.lpp +++ b/crawl-ref/source/util/levcomp.lpp @@ -2,14 +2,15 @@ // levcomp.lpp: // Level compiler lexer for Dungeon Crawl Stone Soup. -// +// // Based loosely on NetHack's lev_comp.l +#include <algorithm> +#include <cstring> +#include <queue> #include "AppHdr.h" #include "mapdef.h" #include "levcomp.tab.h" -#include <cstring> -#include <queue> static bool alloced = false; @@ -127,7 +128,7 @@ NSPACE [^\ \t\r\n] <KEYWORDS>[ \t]+ ; <KEYWORDS>[ \t]*\r?\n { BEGIN(INITIAL); } -<ITEM_LIST>[^, \t\r\n][^,\r\n]*[^, \t\r\n] { +<ITEM_LIST>[^, \t\r\n][^,\r\n]*[^, \t\r\n] { settext(); return ITEM_INFO; } @@ -143,18 +144,18 @@ NSPACE [^\ \t\r\n] <MNAME>[\ \t\r]*\n { BEGIN(INITIAL); } -<MNAME>[^,\ \t\r\n][^,\r\n]+[^,\ \t\r\n] { +<MNAME>[^,\ \t\r\n][^,\r\n]+[^,\ \t\r\n] { settext(); - return MONSTER_NAME; + return MONSTER_NAME; } <MNAME>, return COMMA; <MNAME>[ \t\r]+ ; -<ARGUMENT>{NSPACE}.*{NSPACE} { +<ARGUMENT>{NSPACE}.*{NSPACE} { BEGIN(INITIAL); settext(); - return STRING; + return STRING; } <ARGUMENT>\r?\n { BEGIN(INITIAL); } @@ -177,7 +178,7 @@ NSPACE [^\ \t\r\n] ^[ \t]*: { BEGIN(LUA_ONELINER); return MAIN; } -^[ \t]*prelude[ \t]*\{\{ { BEGIN(LUA); return PRELUDE; } +^[ \t]*prelude[ \t]*\{\{ { BEGIN(LUA); return PRELUDE; } ^[ \t]*lua[ \t]*\{\{ { BEGIN(LUA); return MAIN; } ^[ \t]*\{\{ { BEGIN(LUA); return MAIN; } ^[ \t]*validate[ \t]*\{\{ { BEGIN(LUA); return VALIDATE; } |