samples/uml2sql.yml2
changeset 0 76005e62091d
equal deleted inserted replaced
-1:000000000000 0:76005e62091d
       
     1 define operator "†(\w+)" as call "printType" with "name", "%1";
       
     2 define operator "“(.*?)”" as call "ucase" with "text", "%1";
       
     3 
       
     4 function "ucase" {
       
     5     param "text";
       
     6 
       
     7     > «translate(substring($text, 1, 1), 'abcdefghijklmnopqrstuvwxyz', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ')»
       
     8     > «substring($text, 2)»
       
     9 }
       
    10 
       
    11 function "printType" {
       
    12     param "name";
       
    13 
       
    14     choose {
       
    15         when '$name/@href = "http://schema.omg.org/spec/UML/2.1/uml.xml#UnlimitedNatural"'
       
    16             > INTEGER
       
    17         when '$name/@href = "http://schema.omg.org/spec/UML/2.1/uml.xml#String"'
       
    18             > VARCHAR
       
    19     }
       
    20 }