Template Language - attributes not repeated
If a template definition has attributes - e.g.
prefer
orright
- and this definition is referenced by sort and constructor name in acontext-free priorities
section, then these are not repeated in thecontext-free priorities
section of the generated sdf.Associativity should not be a problem, but I haven’t been able to find an alternative way to mark a rule
prefer
except to use the classical, SDF-style syntaxe.g. if we have the following in
a.tmpl
:templates A.Y = <<E><F>> A.X = <<C><D>> {prefer} context-free priorities A.Y > A.X
then in
agenerated.sdf
, we will have: (omitting content completion stuff)Submitted by Barnabás Králik on 8 April 2013 at 18:04context-free syntax E F -> A {cons("Y")} C D -> A {cons("X"), prefer} context-free priorities { E F -> A } > { C D -> A }
Issue Log
On 17 April 2013 at 11:25 Gabriël Konat tagged error
On 21 September 2013 at 09:40 Guido Wachsmuth tagged sdf
On 21 September 2013 at 09:40 Guido Wachsmuth commented:
If I remember correctly, rules share their annotations between different instances of a rule. Can someone verify this?
Log in to post comments