mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-22 01:22:51 -06:00
Graftals in GF. examples/graftals
This commit is contained in:
11
examples/graftals/Cantor.gf
Normal file
11
examples/graftals/Cantor.gf
Normal file
@@ -0,0 +1,11 @@
|
||||
concrete Cantor of Graftal = {
|
||||
lincat N = {f : Str; g : Str} ;
|
||||
lincat S = {s : Str} ;
|
||||
|
||||
lin z = {f = F; g = G} ;
|
||||
lin s x = {f = x.f ++ x.g ++ x.f; g = x.g ++ x.g ++ x.g} ;
|
||||
lin c x = {s = "newpath 10 550 moveto" ++ x.f ++ "stroke showpage"} ;
|
||||
|
||||
oper F : Str = "1 0 rlineto" ;
|
||||
oper G : Str = "1 0 rmoveto" ;
|
||||
}
|
||||
Reference in New Issue
Block a user