The syntax of StrategoLanguage used to be defined by a LEX/Transform.YetAnotherCompilerCompiler grammar. In order to make maintenance and extension of the syntax definition easier it is desirable to migrate the definition to [[Sdf.WebHome][SDF2]]. See Tools.FromStrategoInYaccToStrategoInSDF for a description of the derivation process. -- Main.EelcoVisser - 27 Oct 2001
------ XT release 0.9 contains the syntax definition corresponding to StrategoRelease062. This does not yet incorporate the extension with TermWrap and TermProject syntax. -- Main.EelcoVisser - 09 Dec 2001 ----- There is a nameclash in Stratego.def/r/pp: the strategy some(s) and the constructor for Option(a), Some(a), have the same constructor: 'Some'. This causes another pretty printing problem. -- Hedzer Westra ----- Ik probeer de stratego grammatica uit GB te gebruiken maar stuit op een probleem: sglr: error in /opt/xt-0.9/share/ssl/list-set.r, line 133, col 17: character `|' unexpected. het betreft hier de paal (|) constructie in onderstaande strategie: collect-all(s) = rec x(![ | ] <+ crush(![],union,x)) De grammatica zegt: "[" {Strategy ","}* "|" Strategy "]" -> Strategy {cons("ListCong")} "<" Strategy ">" Term -> Strategy {cons("BA")} "<" Strategy ">" -> StrategyAngle {cons("AngleStrat")} "<" Strategy ">" Term -> Term {cons("App")} Kortom, =<s>= is een =StrategyAngle= maar =StrategyAngle= komt verder nergens in de grammatica voor. Hoe zullen we dit oplossen? -- Main.MerijnDeJonge - 21 Dec 2001 ------ Dit is een uitbreiding van de syntax die in 0.6.3 is ingevoerd (zie TermProject en TermWrap op de wiki). De syntax in gb gaat over 0.6.2 en moet dus uitgebreid worden tot 0.6.3. Ik zal proberen een dezer dagen die uitbreiding te maken en aan jou opsturen (ik kan niet bij de CVS). Als je tools aan het testen bent kan je ook nog even de oude (0.6.2) versie van de bibliotheek gebruiken. -- Main.EelcoVisser - 21 Dec 2001 ---- Aha, ik begrijp het. Nog een probleem: parseren van module list-set.r van stratego-0.6.1 levert ambiguiteit op in inderstaande strategy: CollectSplit(s, splitter) : c#(as) -> (t, (ys, xs)) where as => (bs, xs); c#(bs) => (t, ys) amb([ ExplodeCong(BA(CallNoArgs(SVar("splitter")),Inj(Var("c"))),ParenStrat(CallNoArgs(SVar("bs")))), BA(CallNoArgs(SVar("splitter")),Explode(Inj(Var("c")),Inj(Var("bs")))) ]) Nog een probleem: De pgen/sglr combinatie die wij in XT bundelen bevat een bug: voor alternatieven wordt de constructor "pair" (i.p.v. "alt") gebruikt. Omdat jij in he stratego syntax gebruik maakt van alternativen, is de bijberende parseboom en AST incorrect. Groet, -- Main.MerijnDeJonge - 21 Dec 2001 These problems have been solved in the stratego-0.7 version in the Sdf.GrammarBase. In addition other new constructs such as GlobalChoice and GuardedLeftChoice have been added. The desugaring has been adapted to FixedLengthTuples. -- Main.EelcoVisser - 03 Feb 2002 ----- CategoryDone | ToDo