You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by Christoph Reck <Ch...@dlr.de> on 2001/02/07 17:04:15 UTC
[BUG] array with single reference
Mr. Parser is unhappy again if you tell him to look over an
array with a single reference:
#set( $foo = [ $list ] )
and emits:
Wed Feb 07 16:58:04 CET 2001 [error] Parser Exception: example.vm : org.apache.velocity.runtime.parser.ParseException: Encountered "] )\n" at line 19, column 22.
Was expecting one of:
".." ...
"," ...
"]" <WHITESPACE> "=" ...
at org.apache.velocity.runtime.parser.Parser.generateParseException(Parser.java:3161)
at org.apache.velocity.runtime.parser.Parser.jj_consume_token(Parser.java:3045)
at org.apache.velocity.runtime.parser.Parser.IntegerRange(Parser.java:813)
Ugly workaround:
#set( $foo = [ "", $list ] )
#call( $foo.remove(0) )
:) Christoph
Re: [BUG] array with single reference
Posted by "Geir Magnusson Jr." <ge...@optonline.net>.
Christoph Reck wrote:
>
> Mr. Parser is unhappy again if you tell him to look over an
> array with a single reference:
>
> #set( $foo = [ $list ] )
>
> and emits:
> Wed Feb 07 16:58:04 CET 2001 [error] Parser Exception: example.vm : org.apache.velocity.runtime.parser.ParseException: Encountered "] )\n" at line 19, column 22.
> Was expecting one of:
> ".." ...
> "," ...
> "]" <WHITESPACE> "=" ...
> at org.apache.velocity.runtime.parser.Parser.generateParseException(Parser.java:3161)
> at org.apache.velocity.runtime.parser.Parser.jj_consume_token(Parser.java:3045)
> at org.apache.velocity.runtime.parser.Parser.IntegerRange(Parser.java:813)
>
> Ugly workaround:
> #set( $foo = [ "", $list ] )
> #call( $foo.remove(0) )
ew... will fix!
> :) Christoph
--
Geir Magnusson Jr. geirm@optonline.com
Velocity : it's not just a good idea. It should be the law.
http://jakarta.apache.org/velocity
Re: [BUG] array with single reference
Posted by "Geir Magnusson Jr." <ge...@optonline.net>.
Mr. Parser is happy now.
Thanks.
geir
Christoph Reck wrote:
>
> Mr. Parser is unhappy again if you tell him to look over an
> array with a single reference:
>
> #set( $foo = [ $list ] )
>
> and emits:
> Wed Feb 07 16:58:04 CET 2001 [error] Parser Exception: example.vm : org.apache.velocity.runtime.parser.ParseException: Encountered "] )\n" at line 19, column 22.
> Was expecting one of:
> ".." ...
> "," ...
> "]" <WHITESPACE> "=" ...
> at org.apache.velocity.runtime.parser.Parser.generateParseException(Parser.java:3161)
> at org.apache.velocity.runtime.parser.Parser.jj_consume_token(Parser.java:3045)
> at org.apache.velocity.runtime.parser.Parser.IntegerRange(Parser.java:813)
>
> Ugly workaround:
> #set( $foo = [ "", $list ] )
> #call( $foo.remove(0) )
>
> :) Christoph
--
Geir Magnusson Jr. geirm@optonline.com
Velocity : it's not just a good idea. It should be the law.
http://jakarta.apache.org/velocity