velocity-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cbris...@apache.org
Subject svn commit: r1860476 - in /velocity/engine/branches/parser_experiments/velocity-engine-core/src/main: java/org/apache/velocity/runtime/ java/org/apache/velocity/runtime/parser/ java/org/apache/velocity/runtime/parser/node/ parser/
Date Sat, 01 Jun 2019 11:21:20 GMT
Author: cbrisson
Date: Sat Jun  1 11:21:20 2019
New Revision: 1860476

URL: http://svn.apache.org/viewvc?rev=1860476&view=rev
Log:
[engine][VELOCITY-917] Fix character names

Modified:
    velocity/engine/branches/parser_experiments/velocity-engine-core/src/main/java/org/apache/velocity/runtime/RuntimeConstants.java
    velocity/engine/branches/parser_experiments/velocity-engine-core/src/main/java/org/apache/velocity/runtime/RuntimeInstance.java
    velocity/engine/branches/parser_experiments/velocity-engine-core/src/main/java/org/apache/velocity/runtime/RuntimeServices.java
    velocity/engine/branches/parser_experiments/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/Parser.java
    velocity/engine/branches/parser_experiments/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTDirective.java
    velocity/engine/branches/parser_experiments/velocity-engine-core/src/main/parser/StandardParser.jjt

Modified: velocity/engine/branches/parser_experiments/velocity-engine-core/src/main/java/org/apache/velocity/runtime/RuntimeConstants.java
URL: http://svn.apache.org/viewvc/velocity/engine/branches/parser_experiments/velocity-engine-core/src/main/java/org/apache/velocity/runtime/RuntimeConstants.java?rev=1860476&r1=1860475&r2=1860476&view=diff
==============================================================================
--- velocity/engine/branches/parser_experiments/velocity-engine-core/src/main/java/org/apache/velocity/runtime/RuntimeConstants.java
(original)
+++ velocity/engine/branches/parser_experiments/velocity-engine-core/src/main/java/org/apache/velocity/runtime/RuntimeConstants.java
Sat Jun  1 11:21:20 2019
@@ -392,25 +392,25 @@ public interface RuntimeConstants extend
      * 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";
 
     /*
      * ----------------------------------------------------------------------

Modified: velocity/engine/branches/parser_experiments/velocity-engine-core/src/main/java/org/apache/velocity/runtime/RuntimeInstance.java
URL: http://svn.apache.org/viewvc/velocity/engine/branches/parser_experiments/velocity-engine-core/src/main/java/org/apache/velocity/runtime/RuntimeInstance.java?rev=1860476&r1=1860475&r2=1860476&view=diff
==============================================================================
--- velocity/engine/branches/parser_experiments/velocity-engine-core/src/main/java/org/apache/velocity/runtime/RuntimeInstance.java
(original)
+++ velocity/engine/branches/parser_experiments/velocity-engine-core/src/main/java/org/apache/velocity/runtime/RuntimeInstance.java
Sat Jun  1 11:21:20 2019
@@ -243,13 +243,13 @@ public class RuntimeInstance implements
      * 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
         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
 
         /* 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
     }
 
     @Override
-    public char arobase()
+    public char at()
     {
-        return arobase;
+        return at;
     }
 
     @Override
-    public char star()
+    public char asterisk()
     {
-        return star;
+        return asterisk;
     }
 }

Modified: velocity/engine/branches/parser_experiments/velocity-engine-core/src/main/java/org/apache/velocity/runtime/RuntimeServices.java
URL: http://svn.apache.org/viewvc/velocity/engine/branches/parser_experiments/velocity-engine-core/src/main/java/org/apache/velocity/runtime/RuntimeServices.java?rev=1860476&r1=1860475&r2=1860476&view=diff
==============================================================================
--- velocity/engine/branches/parser_experiments/velocity-engine-core/src/main/java/org/apache/velocity/runtime/RuntimeServices.java
(original)
+++ velocity/engine/branches/parser_experiments/velocity-engine-core/src/main/java/org/apache/velocity/runtime/RuntimeServices.java
Sat Jun  1 11:21:20 2019
@@ -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();
 }

Modified: velocity/engine/branches/parser_experiments/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/Parser.java
URL: http://svn.apache.org/viewvc/velocity/engine/branches/parser_experiments/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/Parser.java?rev=1860476&r1=1860475&r2=1860476&view=diff
==============================================================================
--- velocity/engine/branches/parser_experiments/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/Parser.java
(original)
+++ velocity/engine/branches/parser_experiments/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/Parser.java
Sat Jun  1 11:21:20 2019
@@ -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();
     }
 }

Modified: velocity/engine/branches/parser_experiments/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTDirective.java
URL: http://svn.apache.org/viewvc/velocity/engine/branches/parser_experiments/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTDirective.java?rev=1860476&r1=1860475&r2=1860476&view=diff
==============================================================================
--- velocity/engine/branches/parser_experiments/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTDirective.java
(original)
+++ velocity/engine/branches/parser_experiments/velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/node/ASTDirective.java
Sat Jun  1 11:21:20 2019
@@ -29,7 +29,6 @@ import org.apache.velocity.runtime.Runti
 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 Simple
                 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 )
                 {

Modified: velocity/engine/branches/parser_experiments/velocity-engine-core/src/main/parser/StandardParser.jjt
URL: http://svn.apache.org/viewvc/velocity/engine/branches/parser_experiments/velocity-engine-core/src/main/parser/StandardParser.jjt?rev=1860476&r1=1860475&r2=1860476&view=diff
==============================================================================
--- velocity/engine/branches/parser_experiments/velocity-engine-core/src/main/parser/StandardParser.jjt
(original)
+++ velocity/engine/branches/parser_experiments/velocity-engine-core/src/main/parser/StandardParser.jjt
Sat Jun  1 11:21:20 2019
@@ -219,8 +219,8 @@ public class StandardParser implements P
          */
          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 P
     }
 
     @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)



Mime
View raw message