[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AST Transformation error



Oh, never mind.  Once again, after staring at this a while and reading the last post on what the error messagte mean, I see the problems.

THanks

Roger

> ----- Original Message -----
> From: "Roger Pomeroy" <rogerandsue@xxxxxxxx>
> To: sablecc-discussion@xxxxxxxxxxxxxxxxx
> Subject: AST Transformation error
> Date: Fri, 24 Oct 2008 20:53:57 -0800
> 
> 
> Ok,  here's another one of my mistakes... can someone point out 
> what I am doing wrong here.  I am trying to transform my cst to 
> ast, in particular for a list of entries like you would get if you 
> had something of the form "ArrayName(arg1, arg2, ...)"
> 
> My productions look like:
>    array_access {->expression}  =
>                  {identifier} identifier
>                  l_par [args]:pt_list r_par {->New 
> expression.function(identifier,[args])}
>               ;
>     pt_list {->expression*} =
>         {one}  [arg]:pt_member                       {->[arg.expression]}
>       | {many} [arg]:pt_member comma [rest]:pt_list  
> {->[arg.expression,rest.expression]}
>       ;
>     pt_member {->expression}     =
>         |  {brkted} less_than [expr]:expression greater_than 
> {->expression.expression}
>         |  {nobrkt} [expr]: expression                       
> {->expression.expression}
>         ;
> 
> but this gives the error:
> Verifying ast alternatives transform identifiers.
> java.lang.RuntimeException: [548,83] production PPtList was 
> transformed, and may not appear here undecorated.
> 	at org.sablecc.sablecc.ResolveTransformIds.error1(Unknown Source)
> 
> The Line 548 that it refers to is the alternative labeled as {many} 
> in the pt_list definition
> 
> Thanks
> 
> Roger
> 
> 
> --
> See Exclusive Video: Hollywood Life's 5th Annual Style Awards
> http://www.hollywoodlife.net/Awards.aspx?AwardsID=style2008
> 
> 
> _______________________________________________
> SableCC-Discussion mailing list
> SableCC-Discussion@xxxxxxxxxxxxxxxxx
> http://lists.sablecc.org/listinfo/sablecc-discussion

>


-- 
See Exclusive Video: Hollywood Life's 5th Annual Style Awards
http://www.hollywoodlife.net/Awards.aspx?AwardsID=style2008