summaryrefslogtreecommitdiff
path: root/src/spell-convert
diff options
context:
space:
mode:
authorBen Longbons <b.r.longbons@gmail.com>2014-04-09 16:51:51 -0700
committerBen Longbons <b.r.longbons@gmail.com>2014-04-09 18:16:28 -0700
commit313b592639aa6aaa342ca34b9b6a8a77a299621a (patch)
treeb1e193927e7158cee09c53a3c832ad5cddc6f609 /src/spell-convert
parent312e4d37cc964bbc5bd4e20fd25500b08dc70268 (diff)
downloadtmwa-313b592639aa6aaa342ca34b9b6a8a77a299621a.tar.gz
tmwa-313b592639aa6aaa342ca34b9b6a8a77a299621a.tar.bz2
tmwa-313b592639aa6aaa342ca34b9b6a8a77a299621a.tar.xz
tmwa-313b592639aa6aaa342ca34b9b6a8a77a299621a.zip
Add all the missing copyright headers
Diffstat (limited to 'src/spell-convert')
-rw-r--r--src/spell-convert/ast.cpp24
-rw-r--r--src/spell-convert/ast.hpp34
-rw-r--r--src/spell-convert/lexer.lpp19
-rw-r--r--src/spell-convert/main.cpp21
-rw-r--r--src/spell-convert/parser.ypp20
5 files changed, 109 insertions, 9 deletions
diff --git a/src/spell-convert/ast.cpp b/src/spell-convert/ast.cpp
index eb66752..e9ec19c 100644
--- a/src/spell-convert/ast.cpp
+++ b/src/spell-convert/ast.cpp
@@ -1,7 +1,27 @@
#include "ast.hpp"
+// ast.cpp - Hacky converter between magic formats.
+//
+// Copyright © 2014 Ben Longbons <b.r.longbons@gmail.com>
+//
+// This file is part of The Mana World (Athena server)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "../io/cxxstdio.hpp"
+#include "../poison.hpp"
+
void Constant::dump()
{
PRINTF("(CONST %s\n", name);
@@ -113,7 +133,7 @@ void ExplicitCallEffect::print()
void SleepEffect::print()
{
PRINTF("(WAIT ");
- time->show();
+ time_->show();
PRINTF(")");
}
void CallExpr::print()
@@ -255,6 +275,6 @@ void SpellGuardMana::declare()
void SpellGuardCasttime::declare()
{
PRINTF("(CASTTIME ");
- time->show();
+ time_->show();
PRINTF(")");
}
diff --git a/src/spell-convert/ast.hpp b/src/spell-convert/ast.hpp
index afb280a..3d2f282 100644
--- a/src/spell-convert/ast.hpp
+++ b/src/spell-convert/ast.hpp
@@ -1,5 +1,25 @@
-#ifndef AST_HPP
-#define AST_HPP
+#ifndef TMWA_SPELL_CONVERT_AST_HPP
+#define TMWA_SPELL_CONVERT_AST_HPP
+// ast.hpp - Hacky converter between magic formats.
+//
+// Copyright © 2014 Ben Longbons <b.r.longbons@gmail.com>
+//
+// This file is part of The Mana World (Athena server)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# include "../sanity.hpp"
# include <deque>
# include <vector>
@@ -222,10 +242,10 @@ struct ExplicitCallEffect : Effect
struct SleepEffect : Effect
{
- Expression *time;
+ Expression *time_;
SleepEffect(Expression *t)
- : time(t)
+ : time_(t)
{}
virtual void print() override;
@@ -336,9 +356,9 @@ struct SpellGuardMana : SpellGuard
};
struct SpellGuardCasttime : SpellGuard
{
- Expression *time;
+ Expression *time_;
- SpellGuardCasttime(Expression *x) : time(x) {}
+ SpellGuardCasttime(Expression *x) : time_(x) {}
virtual void declare() override;
};
@@ -442,4 +462,4 @@ struct AreaBar : Expression
# undef override
# endif
-#endif // AST_HPP
+#endif // TMWA_SPELL_CONVERT_AST_HPP
diff --git a/src/spell-convert/lexer.lpp b/src/spell-convert/lexer.lpp
index 92acf48..b6c6d76 100644
--- a/src/spell-convert/lexer.lpp
+++ b/src/spell-convert/lexer.lpp
@@ -1,6 +1,25 @@
%{
/* vim: set ft=lex: */
//#include "lexer.hpp"
+// magic-interpreter-lexer.lpp - Old magic tokenizer
+//
+// Copyright © 2004-2011 The Mana World Development Team
+// Copyright © 2011-2014 Ben Longbons <b.r.longbons@gmail.com>
+//
+// This file is part of The Mana World (Athena server)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "../strings/rstring.hpp"
#include "../strings/zstring.hpp"
diff --git a/src/spell-convert/main.cpp b/src/spell-convert/main.cpp
index 87f42b9..0c0d04e 100644
--- a/src/spell-convert/main.cpp
+++ b/src/spell-convert/main.cpp
@@ -1,6 +1,27 @@
+// spell-convert/main.cpp - Hacky magic conversion driver.
+//
+// Copyright © 2014 Ben Longbons <b.r.longbons@gmail.com>
+//
+// This file is part of The Mana World (Athena server)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
#include "lexer.hpp"
#include "parser.hpp"
+#include "../poison.hpp"
+
int main()
{
spell_converterparse();
diff --git a/src/spell-convert/parser.ypp b/src/spell-convert/parser.ypp
index 822727d..8a40543 100644
--- a/src/spell-convert/parser.ypp
+++ b/src/spell-convert/parser.ypp
@@ -1,6 +1,26 @@
%code requires
{
/* vim: set ft=yacc: */
+// magic-interpreter-parser.ypp - Old magic tokenizer
+//
+// Copyright © 2004-2011 The Mana World Development Team
+// Copyright © 2011-2014 Ben Longbons <b.r.longbons@gmail.com>
+//
+// This file is part of The Mana World (Athena server)
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
#include "../strings/rstring.hpp"
#include "ast.hpp"