aboutsummaryrefslogtreecommitdiff
path: root/velocity-engine-core/src
diff options
context:
space:
mode:
Diffstat (limited to 'velocity-engine-core/src')
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/RuntimeConstants.java8
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/RuntimeInstance.java24
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/RuntimeServices.java4
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/Parser.java6
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTDirective.java3
-rw-r--r--velocity-engine-core/src/main/parser/StandardParser.jjt16
6 files changed, 30 insertions, 31 deletions
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/RuntimeConstants.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/RuntimeConstants.java
index 545e8f08..b68631b9 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/RuntimeConstants.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/RuntimeConstants.java
@@ -392,25 +392,25 @@ public interface RuntimeConstants extends DeprecatedRuntimeConstants
* Set the character (onlysingle byte UTF-8 supported at present) to use instead of '$' for references.
* @since 2.2
*/
- String PARSER_DOLLAR = "parser.character.dollar";
+ String PARSER_CHAR_DOLLAR = "parser.character.dollar";
/**
* Set the character (onlysingle byte UTF-8 supported at present) to use instead of '#' for directives, macros and comments.
* @since 2.2
*/
- String PARSER_HASH = "parser.character.hash";
+ String PARSER_CHAR_HASH = "parser.character.hash";
/**
* Set the character (onlysingle byte UTF-8 supported at present) to use instead of '@' for '#@' block macros.
* @since 2.2
*/
- String PARSER_AROBASE = "parser.character.arobase";
+ String PARSER_CHAR_AT = "parser.character.at";
/**
* Set the character (onlysingle byte UTF-8 supported at present) to use instead of '*' for '#* *#' block comments.
* @since 2.2
*/
- String PARSER_STAR = "parser.character.star";
+ String PARSER_CHAR_ASTERISK = "parser.character.asterisk";
/*
* ----------------------------------------------------------------------
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/RuntimeInstance.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/RuntimeInstance.java
index 420529c5..929962b9 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/RuntimeInstance.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/RuntimeInstance.java
@@ -243,13 +243,13 @@ public class RuntimeInstance implements RuntimeConstants, RuntimeServices
* Configured '@' character
* @since 2.2
*/
- private char arobase = '$';
+ private char at = '@';
/**
* Configured '*' character
* @since 2.2
*/
- private char star = '$';
+ private char asterisk = '*';
/**
@@ -349,8 +349,8 @@ public class RuntimeInstance implements RuntimeConstants, RuntimeServices
this.stringInterning = false;
this.dollar = '$';
this.hash = '#';
- this.arobase = '@';
- this.star = '*';
+ this.at = '@';
+ this.asterisk = '*';
/*
* create a VM factory, introspector, and application attributes
@@ -413,10 +413,10 @@ public class RuntimeInstance implements RuntimeConstants, RuntimeServices
/* init parser behavior */
hyphenAllowedInIdentifiers = getBoolean(PARSER_HYPHEN_ALLOWED, false);
- dollar = getConfiguredCharacter(PARSER_DOLLAR, '$');
- hash = getConfiguredCharacter(PARSER_HASH, '#');
- arobase = getConfiguredCharacter(PARSER_AROBASE, '@');
- star = getConfiguredCharacter(PARSER_STAR, '*');
+ dollar = getConfiguredCharacter(PARSER_CHAR_DOLLAR, '$');
+ hash = getConfiguredCharacter(PARSER_CHAR_HASH, '#');
+ at = getConfiguredCharacter(PARSER_CHAR_AT, '@');
+ asterisk = getConfiguredCharacter(PARSER_CHAR_ASTERISK, '*');
}
private char getConfiguredCharacter(String configKey, char defaultChar)
@@ -1967,14 +1967,14 @@ public class RuntimeInstance implements RuntimeConstants, RuntimeServices
}
@Override
- public char arobase()
+ public char at()
{
- return arobase;
+ return at;
}
@Override
- public char star()
+ public char asterisk()
{
- return star;
+ return asterisk;
}
}
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/RuntimeServices.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/RuntimeServices.java
index 588580c5..951b15e6 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/RuntimeServices.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/RuntimeServices.java
@@ -509,12 +509,12 @@ public interface RuntimeServices
* @return configured character for '@', or '@'
* @since 2.2
*/
- char arobase();
+ char at();
/**
* Get the character configured for '*'
* @return configured character for '*', or '*'
* @since 2.2
*/
- char star();
+ char asterisk();
}
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/Parser.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/Parser.java
index 14deca2c..73bc0e9b 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/Parser.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/Parser.java
@@ -39,8 +39,8 @@ public interface Parser
char dollar();
char hash();
- char arobase();
- char star();
+ char at();
+ char asterisk();
default String lineComment()
{
@@ -49,6 +49,6 @@ public interface Parser
default String blockComment()
{
- return String.valueOf(hash()) + star();
+ return String.valueOf(hash()) + asterisk();
}
}
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTDirective.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTDirective.java
index 3cb2f865..25bcd62a 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTDirective.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTDirective.java
@@ -29,7 +29,6 @@ import org.apache.velocity.runtime.RuntimeConstants.SpaceGobbling;
import org.apache.velocity.runtime.directive.BlockMacro;
import org.apache.velocity.runtime.directive.Directive;
import org.apache.velocity.runtime.directive.RuntimeMacro;
-import org.apache.velocity.runtime.parser.LogContext;
import org.apache.velocity.runtime.parser.ParseException;
import org.apache.velocity.runtime.parser.Parser;
import org.apache.velocity.runtime.parser.ParserConstants;
@@ -148,7 +147,7 @@ public class ASTDirective extends SimpleNode
directive.setLocation(t.beginLine, t.beginColumn, getTemplate());
directive.init(rsvc, context, this);
}
- else if( directiveName.startsWith(String.valueOf(rsvc.arobase())) )
+ else if( directiveName.startsWith(String.valueOf(rsvc.at())) )
{
if( this.jjtGetNumChildren() > 0 )
{
diff --git a/velocity-engine-core/src/main/parser/StandardParser.jjt b/velocity-engine-core/src/main/parser/StandardParser.jjt
index 3ad16918..c87f672b 100644
--- a/velocity-engine-core/src/main/parser/StandardParser.jjt
+++ b/velocity-engine-core/src/main/parser/StandardParser.jjt
@@ -219,8 +219,8 @@ public class StandardParser implements Parser
*/
dollar = rsvc.dollar();
hash = rsvc.hash();
- arobase = rsvc.arobase();
- star = rsvc.star();
+ at = rsvc.at();
+ asterisk = rsvc.asterisk();
}
/**
@@ -532,21 +532,21 @@ public class StandardParser implements Parser
}
@Override
- public char arobase()
+ public char at()
{
- return arobase;
+ return at;
}
@Override
- public char star()
+ public char asterisk()
{
- return star;
+ return asterisk;
}
private char dollar = '$';
private char hash = '#';
- private char arobase = '@';
- private char star = '*';
+ private char at = '@';
+ private char asterisk = '*';
}
PARSER_END(StandardParser)