Author: dragonking
Date: Thu Aug 21 15:13:05 2008
New Revision: 28824
URL: http://svn.gna.org/viewcvs/wesnoth?rev=28824&view=rev
Log:
Removed obsolete tokens
Modified:
trunk/src/formula.cpp
trunk/src/formula_tokenizer.cpp
trunk/src/formula_tokenizer.hpp
Modified: trunk/src/formula.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/formula.cpp?rev=28824&r1=28823&r2=28824&view=diff
==============================================================================
--- trunk/src/formula.cpp (original)
+++ trunk/src/formula.cpp Thu Aug 21 15:13:05 2008
@@ -533,17 +533,14 @@
{
int parens = 0;
const token* beg = i1;
- const token* begin = i1, *end = i2; //these are used for error
reporting
while(i1 != i2) {
- if(i1->type == TOKEN_LPARENS || i1->type == TOKEN_LSQUARE ||
i1->type == TOKEN_LBRACKET ) {
+ if(i1->type == TOKEN_LPARENS || i1->type == TOKEN_LSQUARE ) {
++parens;
- } else if(i1->type == TOKEN_RPARENS || i1->type ==
TOKEN_RSQUARE || i1->type == TOKEN_RBRACKET) {
+ } else if(i1->type == TOKEN_RPARENS || i1->type ==
TOKEN_RSQUARE ) {
--parens;
} else if(i1->type == TOKEN_COMMA && !parens) {
res->push_back(parse_expression(beg,i1, symbols));
beg = i1+1;
- } else if(i1->type == TOKEN_POINTER) {
- throw formula_error("Unexpected '->' operator
found", tokens_to_string(begin,end-1), *i1->filename, i1->line_number);
}
++i1;
}
Modified: trunk/src/formula_tokenizer.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/formula_tokenizer.cpp?rev=28824&r1=28823&r2=28824&view=diff
==============================================================================
--- trunk/src/formula_tokenizer.cpp (original)
+++ trunk/src/formula_tokenizer.cpp Thu Aug 21 15:13:05 2008
@@ -44,8 +44,6 @@
{ regex("^\\)"), TOKEN_RPARENS },
{ regex("^\\["), TOKEN_LSQUARE },
{ regex("^\\]"), TOKEN_RSQUARE },
- { regex("^\\{"), TOKEN_LBRACKET },
- { regex("^\\}"), TOKEN_RBRACKET },
{ regex("^#.*?#"), TOKEN_COMMENT },
{ regex("^,"), TOKEN_COMMA },
{ regex("^;"), TOKEN_SEMICOLON },
Modified: trunk/src/formula_tokenizer.hpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/formula_tokenizer.hpp?rev=28824&r1=28823&r2=28824&view=diff
==============================================================================
--- trunk/src/formula_tokenizer.hpp (original)
+++ trunk/src/formula_tokenizer.hpp Thu Aug 21 15:13:05 2008
@@ -25,7 +25,6 @@
TOKEN_IDENTIFIER, TOKEN_INTEGER,
TOKEN_LPARENS, TOKEN_RPARENS,
TOKEN_LSQUARE, TOKEN_RSQUARE,
- TOKEN_LBRACKET, TOKEN_RBRACKET,
TOKEN_COMMA, TOKEN_SEMICOLON,
TOKEN_WHITESPACE, TOKEN_EOL, TOKEN_KEYWORD,
TOKEN_COMMENT, TOKEN_POINTER };
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits