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

Byron Foster commented on VELOCITY-631:
---------------------------------------

I looked into it, but it's kind of nasty.  It appears to be a problem in the 
grammer.  the LOOKAHEAD(2) for a Reference is forcing the tokenizer to 
interpret the next token after the reference as a WORD instead of a 
SET_DIRECTIVE (This is happening when the parser is testing for the DOT token). 
 Because it's interpreted as a WORD the rest is interpreted as a directive, 
which of course doesn't allow "=".  I don't know enough about javacc to make 
the changes, and this kind of stuff is delicate :) Maybe someone more familiar 
with javacc and the grammer can pick this up.



> VTL Creates parse error, but shouldn't
> --------------------------------------
>
>                 Key: VELOCITY-631
>                 URL: https://issues.apache.org/jira/browse/VELOCITY-631
>             Project: Velocity
>          Issue Type: Bug
>          Components: Engine
>    Affects Versions: 1.6-beta1
>            Reporter: Byron Foster
>            Priority: Minor
>             Fix For: 1.6
>
>         Attachments: Velocity631TestCase.java
>
>
> The following creates a parse exception, but should not:
> #macro(test $x)$x#set($i=1)#end
> Exception:
> Threw: org.apache.velocity.exception.ParseErrorException
> msg: Encountered "=" at /foo.vm[line 2, column 25]
> Was expecting one of:
>     <RPAREN> ...
>     <WHITESPACE> ...
>     <WHITESPACE> ...

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to