From 10cee0a411231df18449e6f165596fa60752ef8c Mon Sep 17 00:00:00 2001 From: Claude Brisson Date: Fri, 31 May 2019 19:48:57 +0000 Subject: [engine][VELOCITY-917] Preliminary work for VTL chars config: parametrize code using target chars git-svn-id: https://svn.apache.org/repos/asf/velocity/engine/branches/parser_experiments@1860461 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/velocity/runtime/RuntimeConstants.java | 56 +++++++++++++++++----- 1 file changed, 43 insertions(+), 13 deletions(-) (limited to 'velocity-engine-core/src/main/java/org/apache/velocity/runtime/RuntimeConstants.java') 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 27782632..545e8f08 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 @@ -367,22 +367,10 @@ public interface RuntimeConstants extends DeprecatedRuntimeConstants /* * ---------------------------------------------------------------------- - * G E N E R A L R U N T I M E C O N F I G U R A T I O N + * P A R S E R C O N F I G U R A T I O N * ---------------------------------------------------------------------- */ - /** Whether to use string interning. */ - String RUNTIME_STRING_INTERNING = "runtime.string_interning"; - - /** Switch for the interpolation facility for string literals. */ - String INTERPOLATE_STRINGLITERALS = "runtime.interpolate_string_literals"; - - /** Switch for ignoring nulls in math equations vs throwing exceptions. */ - String STRICT_MATH = "runtime.strict_math"; - - /** Key upon which a context should be accessible within itself */ - String CONTEXT_AUTOREFERENCE_KEY = "context.self_reference_key"; - /** * The parser.pool.class property specifies the name of the {@link org.apache.velocity.util.SimplePool} * implementation to use. @@ -400,6 +388,48 @@ public interface RuntimeConstants extends DeprecatedRuntimeConstants */ String PARSER_HYPHEN_ALLOWED = "parser.allow_hyphen_in_identifiers"; + /** + * 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"; + + /** + * 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"; + + /** + * 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"; + + /** + * 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"; + + /* + * ---------------------------------------------------------------------- + * G E N E R A L R U N T I M E C O N F I G U R A T I O N + * ---------------------------------------------------------------------- + */ + + /** Whether to use string interning. */ + String RUNTIME_STRING_INTERNING = "runtime.string_interning"; + + /** Switch for the interpolation facility for string literals. */ + String INTERPOLATE_STRINGLITERALS = "runtime.interpolate_string_literals"; + + /** Switch for ignoring nulls in math equations vs throwing exceptions. */ + String STRICT_MATH = "runtime.strict_math"; + + /** Key upon which a context should be accessible within itself */ + String CONTEXT_AUTOREFERENCE_KEY = "context.self_reference_key"; + /** * Space gobbling mode * @since 2.0 -- cgit v1.2.3