a new abstract syntax in Documentation.gf which allows a more compact definition of the corresponding concrete syntax. The new strategy is so far used only in DocumentationEng and the new DocumentationBul.

This commit is contained in:
kr.angelov
2014-02-17 08:45:57 +00:00
parent 769fd9af69
commit a6747eac6b
10 changed files with 444 additions and 212 deletions

View File

@@ -14,7 +14,8 @@ in {
lincat
Inflection = {s : Str} ;
Inflection = {s : Str} ;
Document = {s : Str} ;
oper
tdf : Str -> Str = \s -> td (intag "i" s) ;
@@ -61,7 +62,7 @@ lin
InflectionVV v = inflectionVerb [] v ;----(verbExample (S.mkCl S.she_NP (lin VV v) (S.mkVP (L.sleep_V)))) (lin V v) ;
InflectionV2V v = inflectionVerb [] v ;----(verbExample (S.mkCl S.she_NP (lin V2V v) S.we_NP (S.mkVP (L.sleep_V)))) (lin V v) ;
ExplainInflection e i = ss (i.s ++ paragraph e.s) ; -- explanation appended in a new paragraph
MkDocument b i e = ss (paragraph b.s ++ i.s ++ paragraph e.s) ; -- explanation appended in a new paragraph
oper
verbExample : CatFin.Cl -> Str = \cl -> (S.mkUtt cl).s ;
@@ -174,4 +175,4 @@ lin
paragraph (intag "b" (heading exampleGr_N ++ ":") ++
intag "i" ((S.mkAdv (lin Prep p) S.it_NP).s ++ ";" ++ (S.mkAdv (lin Prep p) S.we_NP).s))
} ;
}
}