[jira] [Commented] (VELOCITY-901) hyphen in identifiers cause parse error

2018-09-10 Thread Michael Osipov (JIRA)


[ 
https://issues.apache.org/jira/browse/VELOCITY-901?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16609388#comment-16609388
 ] 

Michael Osipov commented on VELOCITY-901:
-

Removed the fix version because nothing has been fixed here.

> hyphen in identifiers cause parse error
> ---
>
> Key: VELOCITY-901
> URL: https://issues.apache.org/jira/browse/VELOCITY-901
> Project: Velocity
>  Issue Type: Bug
>  Components: Engine
>Affects Versions: 2.0
>Reporter: Mark Newton
>Assignee: Claude Brisson
>Priority: Major
> Attachments: err, example2.vm.snip, run.sh
>
>
> Upon upgrading to Velocity 2.0 from a very old version (1.4), hyphens in 
> identifiers in templates throw a ParseException.
> To verify what was happening, I did a clean install of velocity 2.0 to test 
> your example code.  After running the unmodified "example2.vm" successfully I 
> added an identifier with a hyphen and the parse error occurred.
> Apologies if I am missing something (e.g. spec change on identifiers).  If 
> this is an issue that will take a while to fix, please let me know so that I 
> can change out the hyphens to underbars in id's in my template sets.
> Attached are:   1) code snippet 2) parse exception msg 3) cl used to invoke 
> velocity 2.0 upon example2.vm
> Best Regards
> 
> 1) code snippet
> #set($test-var-w-hyphen = "test")
> test-var-w-hyphen : $test-var-w-hyphen
> --
> 2) Parse exception
> [main] ERROR org.apache.velocity.parser - example2.vm: Encountered "-" at 
> line 20, column 11.
>  Was expecting one of:
>  "[" ...
>   ...
>   ...
>  "=" ...
> --
> 3) Command Script
> #/bin/bash
>  java -cp 
> .:/home/test-a/.ant/lib/commons-lang3-3.8.jar:/home/test-a/.ant/lib/slf4j-api-1.7.25.jar:/home/test-a/.ant/lib/velocity-engine-core-2.0.jar:/home/test-a/.ant/lib/velocity-engine-scripting-2.0.jar:/home/test-a/.ant/lib/slf4j-simple-1.7.25.jar
>  org.apache.velocity.example.Example2
>  
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: dev-unsubscr...@velocity.apache.org
For additional commands, e-mail: dev-h...@velocity.apache.org



[jira] [Updated] (VELOCITY-901) hyphen in identifiers cause parse error

2018-09-10 Thread Michael Osipov (JIRA)


 [ 
https://issues.apache.org/jira/browse/VELOCITY-901?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Michael Osipov updated VELOCITY-901:

Fix Version/s: (was: 2.0)

> hyphen in identifiers cause parse error
> ---
>
> Key: VELOCITY-901
> URL: https://issues.apache.org/jira/browse/VELOCITY-901
> Project: Velocity
>  Issue Type: Bug
>  Components: Engine
>Affects Versions: 2.0
>Reporter: Mark Newton
>Assignee: Claude Brisson
>Priority: Major
> Attachments: err, example2.vm.snip, run.sh
>
>
> Upon upgrading to Velocity 2.0 from a very old version (1.4), hyphens in 
> identifiers in templates throw a ParseException.
> To verify what was happening, I did a clean install of velocity 2.0 to test 
> your example code.  After running the unmodified "example2.vm" successfully I 
> added an identifier with a hyphen and the parse error occurred.
> Apologies if I am missing something (e.g. spec change on identifiers).  If 
> this is an issue that will take a while to fix, please let me know so that I 
> can change out the hyphens to underbars in id's in my template sets.
> Attached are:   1) code snippet 2) parse exception msg 3) cl used to invoke 
> velocity 2.0 upon example2.vm
> Best Regards
> 
> 1) code snippet
> #set($test-var-w-hyphen = "test")
> test-var-w-hyphen : $test-var-w-hyphen
> --
> 2) Parse exception
> [main] ERROR org.apache.velocity.parser - example2.vm: Encountered "-" at 
> line 20, column 11.
>  Was expecting one of:
>  "[" ...
>   ...
>   ...
>  "=" ...
> --
> 3) Command Script
> #/bin/bash
>  java -cp 
> .:/home/test-a/.ant/lib/commons-lang3-3.8.jar:/home/test-a/.ant/lib/slf4j-api-1.7.25.jar:/home/test-a/.ant/lib/velocity-engine-core-2.0.jar:/home/test-a/.ant/lib/velocity-engine-scripting-2.0.jar:/home/test-a/.ant/lib/slf4j-simple-1.7.25.jar
>  org.apache.velocity.example.Example2
>  
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: dev-unsubscr...@velocity.apache.org
For additional commands, e-mail: dev-h...@velocity.apache.org



[jira] [Commented] (VELOCITY-901) hyphen in identifiers cause parse error

2018-09-10 Thread Claude Brisson (JIRA)


[ 
https://issues.apache.org/jira/browse/VELOCITY-901?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16609353#comment-16609353
 ] 

Claude Brisson commented on VELOCITY-901:
-

> Does it work if you put curlies around the variable name?

No. And probably not easy to integrate in the parser. Certainly not very 
consistent, and maybe not worth it for backward compatibility, since it still 
requires a templates review.

 

> hyphen in identifiers cause parse error
> ---
>
> Key: VELOCITY-901
> URL: https://issues.apache.org/jira/browse/VELOCITY-901
> Project: Velocity
>  Issue Type: Bug
>  Components: Engine
>Affects Versions: 2.0
>Reporter: Mark Newton
>Assignee: Claude Brisson
>Priority: Major
> Fix For: 2.0
>
> Attachments: err, example2.vm.snip, run.sh
>
>
> Upon upgrading to Velocity 2.0 from a very old version (1.4), hyphens in 
> identifiers in templates throw a ParseException.
> To verify what was happening, I did a clean install of velocity 2.0 to test 
> your example code.  After running the unmodified "example2.vm" successfully I 
> added an identifier with a hyphen and the parse error occurred.
> Apologies if I am missing something (e.g. spec change on identifiers).  If 
> this is an issue that will take a while to fix, please let me know so that I 
> can change out the hyphens to underbars in id's in my template sets.
> Attached are:   1) code snippet 2) parse exception msg 3) cl used to invoke 
> velocity 2.0 upon example2.vm
> Best Regards
> 
> 1) code snippet
> #set($test-var-w-hyphen = "test")
> test-var-w-hyphen : $test-var-w-hyphen
> --
> 2) Parse exception
> [main] ERROR org.apache.velocity.parser - example2.vm: Encountered "-" at 
> line 20, column 11.
>  Was expecting one of:
>  "[" ...
>   ...
>   ...
>  "=" ...
> --
> 3) Command Script
> #/bin/bash
>  java -cp 
> .:/home/test-a/.ant/lib/commons-lang3-3.8.jar:/home/test-a/.ant/lib/slf4j-api-1.7.25.jar:/home/test-a/.ant/lib/velocity-engine-core-2.0.jar:/home/test-a/.ant/lib/velocity-engine-scripting-2.0.jar:/home/test-a/.ant/lib/slf4j-simple-1.7.25.jar
>  org.apache.velocity.example.Example2
>  
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: dev-unsubscr...@velocity.apache.org
For additional commands, e-mail: dev-h...@velocity.apache.org



[jira] [Commented] (VELOCITY-901) hyphen in identifiers cause parse error

2018-09-10 Thread Sergiu Dumitriu (JIRA)


[ 
https://issues.apache.org/jira/browse/VELOCITY-901?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16609306#comment-16609306
 ] 

Sergiu Dumitriu commented on VELOCITY-901:
--

Does it work if you put curlies around the variable name?

 
{noformat}
#set(${test-var-w-hyphen} = "test")
test-var-w-hyphen : ${test-var-w-hyphen}
{noformat}

> hyphen in identifiers cause parse error
> ---
>
> Key: VELOCITY-901
> URL: https://issues.apache.org/jira/browse/VELOCITY-901
> Project: Velocity
>  Issue Type: Bug
>  Components: Engine
>Affects Versions: 2.0
>Reporter: Mark Newton
>Assignee: Claude Brisson
>Priority: Major
> Fix For: 2.0
>
> Attachments: err, example2.vm.snip, run.sh
>
>
> Upon upgrading to Velocity 2.0 from a very old version (1.4), hyphens in 
> identifiers in templates throw a ParseException.
> To verify what was happening, I did a clean install of velocity 2.0 to test 
> your example code.  After running the unmodified "example2.vm" successfully I 
> added an identifier with a hyphen and the parse error occurred.
> Apologies if I am missing something (e.g. spec change on identifiers).  If 
> this is an issue that will take a while to fix, please let me know so that I 
> can change out the hyphens to underbars in id's in my template sets.
> Attached are:   1) code snippet 2) parse exception msg 3) cl used to invoke 
> velocity 2.0 upon example2.vm
> Best Regards
> 
> 1) code snippet
> #set($test-var-w-hyphen = "test")
> test-var-w-hyphen : $test-var-w-hyphen
> --
> 2) Parse exception
> [main] ERROR org.apache.velocity.parser - example2.vm: Encountered "-" at 
> line 20, column 11.
>  Was expecting one of:
>  "[" ...
>   ...
>   ...
>  "=" ...
> --
> 3) Command Script
> #/bin/bash
>  java -cp 
> .:/home/test-a/.ant/lib/commons-lang3-3.8.jar:/home/test-a/.ant/lib/slf4j-api-1.7.25.jar:/home/test-a/.ant/lib/velocity-engine-core-2.0.jar:/home/test-a/.ant/lib/velocity-engine-scripting-2.0.jar:/home/test-a/.ant/lib/slf4j-simple-1.7.25.jar
>  org.apache.velocity.example.Example2
>  
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: dev-unsubscr...@velocity.apache.org
For additional commands, e-mail: dev-h...@velocity.apache.org



[jira] [Closed] (VELOCITY-901) hyphen in identifiers cause parse error

2018-09-10 Thread Claude Brisson (JIRA)


 [ 
https://issues.apache.org/jira/browse/VELOCITY-901?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Claude Brisson closed VELOCITY-901.
---
   Resolution: Not A Bug
 Assignee: Claude Brisson
Fix Version/s: 2.0

> hyphen in identifiers cause parse error
> ---
>
> Key: VELOCITY-901
> URL: https://issues.apache.org/jira/browse/VELOCITY-901
> Project: Velocity
>  Issue Type: Bug
>  Components: Engine
>Affects Versions: 2.0
>Reporter: Mark Newton
>Assignee: Claude Brisson
>Priority: Major
> Fix For: 2.0
>
> Attachments: err, example2.vm.snip, run.sh
>
>
> Upon upgrading to Velocity 2.0 from a very old version (1.4), hyphens in 
> identifiers in templates throw a ParseException.
> To verify what was happening, I did a clean install of velocity 2.0 to test 
> your example code.  After running the unmodified "example2.vm" successfully I 
> added an identifier with a hyphen and the parse error occurred.
> Apologies if I am missing something (e.g. spec change on identifiers).  If 
> this is an issue that will take a while to fix, please let me know so that I 
> can change out the hyphens to underbars in id's in my template sets.
> Attached are:   1) code snippet 2) parse exception msg 3) cl used to invoke 
> velocity 2.0 upon example2.vm
> Best Regards
> 
> 1) code snippet
> #set($test-var-w-hyphen = "test")
> test-var-w-hyphen : $test-var-w-hyphen
> --
> 2) Parse exception
> [main] ERROR org.apache.velocity.parser - example2.vm: Encountered "-" at 
> line 20, column 11.
>  Was expecting one of:
>  "[" ...
>   ...
>   ...
>  "=" ...
> --
> 3) Command Script
> #/bin/bash
>  java -cp 
> .:/home/test-a/.ant/lib/commons-lang3-3.8.jar:/home/test-a/.ant/lib/slf4j-api-1.7.25.jar:/home/test-a/.ant/lib/velocity-engine-core-2.0.jar:/home/test-a/.ant/lib/velocity-engine-scripting-2.0.jar:/home/test-a/.ant/lib/slf4j-simple-1.7.25.jar
>  org.apache.velocity.example.Example2
>  
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: dev-unsubscr...@velocity.apache.org
For additional commands, e-mail: dev-h...@velocity.apache.org



[jira] [Commented] (VELOCITY-901) hyphen in identifiers cause parse error

2018-09-10 Thread Mark Newton (JIRA)


[ 
https://issues.apache.org/jira/browse/VELOCITY-901?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16609132#comment-16609132
 ] 

Mark Newton commented on VELOCITY-901:
--

Thanks for letting me know about the  '-' change in 2.0.  Sorry I did not see 
it in the 2.0 release notes.  I will change my templates.  I understand that 
having a character that can be both viable component of identifiers and an 
operator turns into a parsing nightmare.

> hyphen in identifiers cause parse error
> ---
>
> Key: VELOCITY-901
> URL: https://issues.apache.org/jira/browse/VELOCITY-901
> Project: Velocity
>  Issue Type: Bug
>  Components: Engine
>Affects Versions: 2.0
>Reporter: Mark Newton
>Priority: Major
> Attachments: err, example2.vm.snip, run.sh
>
>
> Upon upgrading to Velocity 2.0 from a very old version (1.4), hyphens in 
> identifiers in templates throw a ParseException.
> To verify what was happening, I did a clean install of velocity 2.0 to test 
> your example code.  After running the unmodified "example2.vm" successfully I 
> added an identifier with a hyphen and the parse error occurred.
> Apologies if I am missing something (e.g. spec change on identifiers).  If 
> this is an issue that will take a while to fix, please let me know so that I 
> can change out the hyphens to underbars in id's in my template sets.
> Attached are:   1) code snippet 2) parse exception msg 3) cl used to invoke 
> velocity 2.0 upon example2.vm
> Best Regards
> 
> 1) code snippet
> #set($test-var-w-hyphen = "test")
> test-var-w-hyphen : $test-var-w-hyphen
> --
> 2) Parse exception
> [main] ERROR org.apache.velocity.parser - example2.vm: Encountered "-" at 
> line 20, column 11.
>  Was expecting one of:
>  "[" ...
>   ...
>   ...
>  "=" ...
> --
> 3) Command Script
> #/bin/bash
>  java -cp 
> .:/home/test-a/.ant/lib/commons-lang3-3.8.jar:/home/test-a/.ant/lib/slf4j-api-1.7.25.jar:/home/test-a/.ant/lib/velocity-engine-core-2.0.jar:/home/test-a/.ant/lib/velocity-engine-scripting-2.0.jar:/home/test-a/.ant/lib/slf4j-simple-1.7.25.jar
>  org.apache.velocity.example.Example2
>  
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: dev-unsubscr...@velocity.apache.org
For additional commands, e-mail: dev-h...@velocity.apache.org



[jira] [Commented] (VELOCITY-901) hyphen in identifiers cause parse error

2018-09-10 Thread Thomas Mortagne (JIRA)


[ 
https://issues.apache.org/jira/browse/VELOCITY-901?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16609063#comment-16609063
 ] 

Thomas Mortagne commented on VELOCITY-901:
--

bq. his was very confusing for newcomers. Do you really think you want them 
back?!

I agree but on my side the issue is how to deal with retro compatibility. Such 
a change is a major breakage (even if documented).

> hyphen in identifiers cause parse error
> ---
>
> Key: VELOCITY-901
> URL: https://issues.apache.org/jira/browse/VELOCITY-901
> Project: Velocity
>  Issue Type: Bug
>  Components: Engine
>Affects Versions: 2.0
>Reporter: Mark Newton
>Priority: Major
> Attachments: err, example2.vm.snip, run.sh
>
>
> Upon upgrading to Velocity 2.0 from a very old version (1.4), hyphens in 
> identifiers in templates throw a ParseException.
> To verify what was happening, I did a clean install of velocity 2.0 to test 
> your example code.  After running the unmodified "example2.vm" successfully I 
> added an identifier with a hyphen and the parse error occurred.
> Apologies if I am missing something (e.g. spec change on identifiers).  If 
> this is an issue that will take a while to fix, please let me know so that I 
> can change out the hyphens to underbars in id's in my template sets.
> Attached are:   1) code snippet 2) parse exception msg 3) cl used to invoke 
> velocity 2.0 upon example2.vm
> Best Regards
> 
> 1) code snippet
> #set($test-var-w-hyphen = "test")
> test-var-w-hyphen : $test-var-w-hyphen
> --
> 2) Parse exception
> [main] ERROR org.apache.velocity.parser - example2.vm: Encountered "-" at 
> line 20, column 11.
>  Was expecting one of:
>  "[" ...
>   ...
>   ...
>  "=" ...
> --
> 3) Command Script
> #/bin/bash
>  java -cp 
> .:/home/test-a/.ant/lib/commons-lang3-3.8.jar:/home/test-a/.ant/lib/slf4j-api-1.7.25.jar:/home/test-a/.ant/lib/velocity-engine-core-2.0.jar:/home/test-a/.ant/lib/velocity-engine-scripting-2.0.jar:/home/test-a/.ant/lib/slf4j-simple-1.7.25.jar
>  org.apache.velocity.example.Example2
>  
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: dev-unsubscr...@velocity.apache.org
For additional commands, e-mail: dev-h...@velocity.apache.org



[jira] [Commented] (VELOCITY-901) hyphen in identifiers cause parse error

2018-09-10 Thread Claude Brisson (JIRA)


[ 
https://issues.apache.org/jira/browse/VELOCITY-901?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16609056#comment-16609056
 ] 

Claude Brisson commented on VELOCITY-901:
-

If you allow hyphens in identifiers, how can you successfully parse the 
following?

{{#set($bar = 10)}}
 {{#set($foo = $bar-5)}}

 In 1.7, you had to add spaces around the hyphen for it to become a minus 
operator. This was very confusing for newcomers. Do you really think you want 
them back?!

> hyphen in identifiers cause parse error
> ---
>
> Key: VELOCITY-901
> URL: https://issues.apache.org/jira/browse/VELOCITY-901
> Project: Velocity
>  Issue Type: Bug
>  Components: Engine
>Affects Versions: 2.0
>Reporter: Mark Newton
>Priority: Major
> Attachments: err, example2.vm.snip, run.sh
>
>
> Upon upgrading to Velocity 2.0 from a very old version (1.4), hyphens in 
> identifiers in templates throw a ParseException.
> To verify what was happening, I did a clean install of velocity 2.0 to test 
> your example code.  After running the unmodified "example2.vm" successfully I 
> added an identifier with a hyphen and the parse error occurred.
> Apologies if I am missing something (e.g. spec change on identifiers).  If 
> this is an issue that will take a while to fix, please let me know so that I 
> can change out the hyphens to underbars in id's in my template sets.
> Attached are:   1) code snippet 2) parse exception msg 3) cl used to invoke 
> velocity 2.0 upon example2.vm
> Best Regards
> 
> 1) code snippet
> #set($test-var-w-hyphen = "test")
> test-var-w-hyphen : $test-var-w-hyphen
> --
> 2) Parse exception
> [main] ERROR org.apache.velocity.parser - example2.vm: Encountered "-" at 
> line 20, column 11.
>  Was expecting one of:
>  "[" ...
>   ...
>   ...
>  "=" ...
> --
> 3) Command Script
> #/bin/bash
>  java -cp 
> .:/home/test-a/.ant/lib/commons-lang3-3.8.jar:/home/test-a/.ant/lib/slf4j-api-1.7.25.jar:/home/test-a/.ant/lib/velocity-engine-core-2.0.jar:/home/test-a/.ant/lib/velocity-engine-scripting-2.0.jar:/home/test-a/.ant/lib/slf4j-simple-1.7.25.jar
>  org.apache.velocity.example.Example2
>  
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: dev-unsubscr...@velocity.apache.org
For additional commands, e-mail: dev-h...@velocity.apache.org



[jira] [Commented] (VELOCITY-901) hyphen in identifiers cause parse error

2018-09-10 Thread Michael Osipov (JIRA)


[ 
https://issues.apache.org/jira/browse/VELOCITY-901?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16608989#comment-16608989
 ] 

Michael Osipov commented on VELOCITY-901:
-

Have you looked up the offending commit for this change?

I am included to close this one because breaking changes are perfectly fine 
within a major release. Though, I happily wait for your SVN log analysis.

> hyphen in identifiers cause parse error
> ---
>
> Key: VELOCITY-901
> URL: https://issues.apache.org/jira/browse/VELOCITY-901
> Project: Velocity
>  Issue Type: Bug
>  Components: Engine
>Affects Versions: 2.0
>Reporter: Mark Newton
>Priority: Major
> Attachments: err, example2.vm.snip, run.sh
>
>
> Upon upgrading to Velocity 2.0 from a very old version (1.4), hyphens in 
> identifiers in templates throw a ParseException.
> To verify what was happening, I did a clean install of velocity 2.0 to test 
> your example code.  After running the unmodified "example2.vm" successfully I 
> added an identifier with a hyphen and the parse error occurred.
> Apologies if I am missing something (e.g. spec change on identifiers).  If 
> this is an issue that will take a while to fix, please let me know so that I 
> can change out the hyphens to underbars in id's in my template sets.
> Attached are:   1) code snippet 2) parse exception msg 3) cl used to invoke 
> velocity 2.0 upon example2.vm
> Best Regards
> 
> 1) code snippet
> #set($test-var-w-hyphen = "test")
> test-var-w-hyphen : $test-var-w-hyphen
> --
> 2) Parse exception
> [main] ERROR org.apache.velocity.parser - example2.vm: Encountered "-" at 
> line 20, column 11.
>  Was expecting one of:
>  "[" ...
>   ...
>   ...
>  "=" ...
> --
> 3) Command Script
> #/bin/bash
>  java -cp 
> .:/home/test-a/.ant/lib/commons-lang3-3.8.jar:/home/test-a/.ant/lib/slf4j-api-1.7.25.jar:/home/test-a/.ant/lib/velocity-engine-core-2.0.jar:/home/test-a/.ant/lib/velocity-engine-scripting-2.0.jar:/home/test-a/.ant/lib/slf4j-simple-1.7.25.jar
>  org.apache.velocity.example.Example2
>  
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: dev-unsubscr...@velocity.apache.org
For additional commands, e-mail: dev-h...@velocity.apache.org



[jira] [Commented] (VELOCITY-901) hyphen in identifiers cause parse error

2018-09-10 Thread Thomas Mortagne (JIRA)


[ 
https://issues.apache.org/jira/browse/VELOCITY-901?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16608862#comment-16608862
 ] 

Thomas Mortagne commented on VELOCITY-901:
--

This is actually documented in the Velocity 2 release note 
(http://velocity.apache.org/engine/2.0/upgrading.html)

{noformat}
  * the hypen ( - ) cannot be used in variable names anymore
{noformat}

But yes I'm not super happy about it either.

> hyphen in identifiers cause parse error
> ---
>
> Key: VELOCITY-901
> URL: https://issues.apache.org/jira/browse/VELOCITY-901
> Project: Velocity
>  Issue Type: Bug
>  Components: Engine
>Affects Versions: 2.0
>Reporter: Mark Newton
>Priority: Major
> Attachments: err, example2.vm.snip, run.sh
>
>
> Upon upgrading to Velocity 2.0 from a very old version (1.4), hyphens in 
> identifiers in templates throw a ParseException.
> To verify what was happening, I did a clean install of velocity 2.0 to test 
> your example code.  After running the unmodified "example2.vm" successfully I 
> added an identifier with a hyphen and the parse error occurred.
> Apologies if I am missing something (e.g. spec change on identifiers).  If 
> this is an issue that will take a while to fix, please let me know so that I 
> can change out the hyphens to underbars in id's in my template sets.
> Attached are:   1) code snippet 2) parse exception msg 3) cl used to invoke 
> velocity 2.0 upon example2.vm
> Best Regards
> 
> 1) code snippet
> #set($test-var-w-hyphen = "test")
> test-var-w-hyphen : $test-var-w-hyphen
> --
> 2) Parse exception
> [main] ERROR org.apache.velocity.parser - example2.vm: Encountered "-" at 
> line 20, column 11.
>  Was expecting one of:
>  "[" ...
>   ...
>   ...
>  "=" ...
> --
> 3) Command Script
> #/bin/bash
>  java -cp 
> .:/home/test-a/.ant/lib/commons-lang3-3.8.jar:/home/test-a/.ant/lib/slf4j-api-1.7.25.jar:/home/test-a/.ant/lib/velocity-engine-core-2.0.jar:/home/test-a/.ant/lib/velocity-engine-scripting-2.0.jar:/home/test-a/.ant/lib/slf4j-simple-1.7.25.jar
>  org.apache.velocity.example.Example2
>  
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: dev-unsubscr...@velocity.apache.org
For additional commands, e-mail: dev-h...@velocity.apache.org