forked from GitHub/gf-core
multimodality exx
This commit is contained in:
8
grammars/prelude/HTML.gf
Normal file
8
grammars/prelude/HTML.gf
Normal file
@@ -0,0 +1,8 @@
|
||||
resource HTML = open Prelude in {
|
||||
oper
|
||||
tag : Str -> Str = \t -> "<" + t + ">" ;
|
||||
endtag : Str -> Str = \t -> tag ("/" + t) ;
|
||||
intag : Str -> Str -> Str = \t,s -> tag t ++ s ++ endtag t ;
|
||||
intagAttr : Str -> Str -> Str -> Str =
|
||||
\t,a,s -> ("<" + t) ++ (a + ">") ++ s ++ endtag t ;
|
||||
}
|
||||
12
grammars/prelude/Latex.gf
Normal file
12
grammars/prelude/Latex.gf
Normal file
@@ -0,0 +1,12 @@
|
||||
resource Latex = open Prelude in {
|
||||
oper
|
||||
command : Str -> Str = \c -> "\\" + c ;
|
||||
fun1 : Str -> Str -> Str = \f,x -> "\\" + f + "{" ++ x ++ "}" ;
|
||||
fun2 : Str -> Str -> Str -> Str =
|
||||
\f,x,y -> "\\" + f + "{" ++ x ++ "}{" ++ y ++ "}" ;
|
||||
begin : Str -> Str = \e -> "\\begin{" + e + "}" ;
|
||||
end : Str -> Str = \e -> "\\end{" + e + "}" ;
|
||||
inEnv : Str -> Str -> Str = \e,s -> begin e ++ s ++ end e ;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user