Suggested addition to EmbeddedJava.sdf:

“~*” E -> { EnumConst “,” }* {cons(“FromMetaExpr”)}

Reason (this example shows the proposed list splice operator being used in the first rule):

input-dict-to-java:
Some(InputDict(i*)) -> class-body-dec |[ private enum Input { ~<map(input-to-enum)>i } ]|

input-to-enum:
input |[
~InputName(i,j) { d }
]| -> EnumConst(Id(j), None(), None())

Submitted on 2 December 2010 at 11:18
EmbeddedJava.sdf2 December 2010 at 11:19

On 2 December 2010 at 11:24 Shannon Bay commented:

Previous post was not formatted correctly. Trying again…

Suggested addition to EmbeddedJava.sdf:

"~*" E -> { EnumConst "," }* {cons("FromMetaExpr")}

Reason (this example shows the proposed list splice operator being used in the first rule):

input-dict-to-java: 
    Some(InputDict(i*)) -> class-body-dec |[ private enum Input { ~*<map(input-to-enum)>i* } ]|

input-to-enum:
    input |[ 
        ~InputName(i,j) { d } 
    ]| -> EnumConst(Id(j), None(), None()) 

On 3 December 2010 at 00:34 Shannon Bay tagged !bayshan

Log in to post comments