Assume the following templates:

Ps.Single = <single <P>>
P.P = <<ID> : <ID>>

This will generate a completion template for Ps:

completion template Ps : "single ID : ID" =
"single " <ID : ID:P>  

Here, ID : ID is a label for P. However, the : causes a parse error.

Current work around: Provide a custom label.

Ps.Single = <single <P; text="label text">>

However, make sure the label does not contain :.

Possible fix: Mandatory brackets for labels, e.g. "...".

Smarter generation of labels, e.g. by using labels from syntax rules, is an issue anyway.

Ps.Single = <single <param:P>> 

or

Ps.Single = "single" param:P
Submitted by Guido Wachsmuth on 18 April 2013 at 14:54

On 18 April 2013 at 14:54 Guido Wachsmuth tagged completion

On 18 April 2013 at 14:54 Guido Wachsmuth tagged @tvo

On 18 April 2013 at 14:54 Guido Wachsmuth removed tag @tvo

On 24 September 2013 at 23:02 Guido Wachsmuth tagged sdf

On 24 September 2013 at 23:06 Guido Wachsmuth commented:

I found another escape error in an SDF3 generator. When generating SDF2 rules from templates, the generator escapes ' in a string "\'", which causes a parse error in SDF2. The escape is wrong, "'" works.

Log in to post comments