Introduction

gen-renamed-sdf-module generates an SDF module that renames all SDF sorts in a given SDF definition.

Example

Syntax definition:

definition
module Expressions
imports Identifiers [Id => MyId]
  exports
    sorts Exp

    context-free syntax
      Id        -> Exp {cons("Var")}
      IntConst  -> Exp {cons("Int")}

      Exp "+"  Exp -> Exp  {left, cons("Plus")}

    lexical syntax
      [\ \t\n]  -> LAYOUT
      [0-9]+    -> IntConst

module Identifiers
  exports
    sorts Id

    lexical syntax
      [a-zA-Z]+ -> Id

Invocation:

  > gen-renamed-sdf-module -i Exp.def -m Expressions --name Exp-Prefixed --prefix Exp

Result:

module Exp-Prefixed
imports Expressions
          [ IntConst => ExpIntConst
            MyId     => ExpMyId
            Exp      => ExpExp ]

Revision: r1.2 - 25 Mar 2004 - 22:04 - MartinBravenboer
Tools > ReleasePlan > ReleasePlan > StrategoRelease09 > SdfTools > GenRenamedSdfModule
Copyright © 1999-2020 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback